Jack Walker Posted May 9, 2013 Share Posted May 9, 2013 This tutorial is designed for the Debug ROM in particular. However, it can be used with other versions of Zelda as well as most N64 games. Things you need:N64 Sound ToolsA hex editorTableDesign and AdpcmencAudacity 1. Extract Adpcmenc and TableDesign to somewhere. It is recommended that you keep these two files together, along with the sound effect you wish to convert. 2. Open up N64 Sound Tools and select File->Open Known Game->Ken Griffy's...-> Legend of Zelda Ocarina of Time Debug ROM. Navigate to your ROM file and open it. 3. Find the sound effect you want to replace by selecting an "Instrument" and clicking play. 4. Once you have found the desired sound effect to replace, click on the button labeled "16-bit Raw" in the bottom right of the window and save the file to somewhere. We will be using this later. 5. Your sound effect needs to be converted into the aiff format. Open up audacity and open the sound effect. Go to File->Export and save your file as an aiff. 6. We will need to create a "codebook" to convert our sound. Open up command prompt and navigate to the directory with the conversion tools and the sound effect. Run the program tabledesign with the following syntax: "tabledesign mysoundeffect.aiff > codebookname.txt". 7. Now you can convert your sound effect to a format the N64 understands with the program adpcmenc. Using the command prompt, run the program with the following syntax: "adpcmenc -c codebookname.txt mysoundeffect.aiff mynewsoundeffect.aifc". 8. Now you need to find the location of the sound effect inside OOT's ROM. Open up the sound effect we extracted earlier in a hex editor and the ROM and search for the first 5 bytes or so of the sound effect in the ROM. If you find multiple results, add more bytes from the sound effect to the search. 9. Finally we need to copy the sound data to the ROM. Find the string "SSND" inside the sound effect and copy everything one line below it. Then, paste the data into the ROM from where the sound effect is located. 10. If all goes well, the sound effect should be playable in the game. One important thing to note is that if the sound effect is smaller than the one you are replacing, then part of the original sound effect may play in addition to the one you replaced. One way to fix this is to write zeros over the leftover data in the ROM. Another problem is that if the sound effect is bigger than the original, it will overwrite other sound effects and may not play properly. The solution to this is to change the pointer that dictates where the sound is located in the ROM. I will update my tutorial with information on how to do this. Below is a video demonstrating custom sound effects. If you have any ideas for improving this tutorial, feedback is appreciated. 11 Link to comment Share on other sites More sharing options...
!Tommy Posted May 9, 2013 Share Posted May 9, 2013 This is exactly what I'm looking for! Just one question, how do we import the RAW 16-bit sound sample into Audacity. It tells me instead of going File>Open, do File>Import>Raw Data. There I'm presented with a window asking me what kind of settings I'd like to use. Which do I pick...or am I off base completely? Link to comment Share on other sites More sharing options...
Jack Walker Posted May 9, 2013 Author Share Posted May 9, 2013 This is exactly what I'm looking for! Just one question, how do we import the RAW 16-bit sound sample into Audacity. It tells me instead of going File>Open, do File>Import>Raw Data. There I'm presented with a window asking me what kind of settings I'd like to use. Which do I pick...or am I off base completely? I don't think Audacity supports VADPCM audio. If you want to convert a sound effect from a game, click the save button to the right of the play button to save the audio to a .wav. Link to comment Share on other sites More sharing options...
!Tommy Posted May 9, 2013 Share Posted May 9, 2013 oookay! Now that makes a bit of sense. Basically my goal right now is converting Majora's Mask sound effects to Ocarina of Time. Link to comment Share on other sites More sharing options...
Jack Walker Posted May 9, 2013 Author Share Posted May 9, 2013 oookay! Now that makes a bit of sense. Basically my goal right now is converting Majora's Mask sound effects to Ocarina of Time. If that's what you're doing, you won't need to do any conversions. All you need to do is find the sound effect in Majora's Mask and save it as a 16-bit raw. then find the sound effect in OOT you want to replace and where it is located in the ROM and copy and paste the sound data from the 16-bit raw into the ROM. Link to comment Share on other sites More sharing options...
giadrosich Posted May 9, 2013 Share Posted May 9, 2013 You are a wonderful person, I'm going to straight up add this to the tutorial thread. I love contributions! Link to comment Share on other sites More sharing options...
!Tommy Posted May 9, 2013 Share Posted May 9, 2013 oookay! Now that makes a bit of sense. Basically my goal right now is converting Majora's Mask sound effects to Ocarina of Time. If that's what you're doing, you won't need to do any conversions. All you need to do is find the sound effect in Majora's Mask and save it as a 16-bit raw. then find the sound effect in OOT you want to replace and where it is located in the ROM and copy and paste the sound data from the 16-bit raw into the ROM. That's honestly what I thought, but when I go ahead and do it, it gets angry at me. D: Read more about my problem with it here: http://www.the-gcn.com/topic/2349-replacing-sounds-in-ocarina-of-time-debug-version/?p=37022 Link to comment Share on other sites More sharing options...
Airikita Posted May 10, 2013 Share Posted May 10, 2013 I will post here as a bookmark. Link to comment Share on other sites More sharing options...
Conker Posted May 10, 2013 Share Posted May 10, 2013 Most N64 games? Does that mean, if I wanted to, I could do a full overhaul of Star Fox 64's voice overs? Or is it not a supported game? I'd like confirmation, please. 1 Link to comment Share on other sites More sharing options...
Jack Walker Posted May 10, 2013 Author Share Posted May 10, 2013 Most N64 games? Does that mean, if I wanted to, I could do a full overhaul of Star Fox 64's voice overs? Or is it not a supported game? I'd like confirmation, please. In theory, this should be possible. As far as I'm aware, all N64 games use VADPCM audio. However, I have not tested this and you probably will have to modify the pointer to the sound data since the voice overs in SF64 are probably bigger than most sound effects in OOT. I'll take a look at SF64 to confirm this. 2 Link to comment Share on other sites More sharing options...
Airikita Posted August 31, 2013 Share Posted August 31, 2013 Will this work for Navi's voice? Link to comment Share on other sites More sharing options...
!Tommy Posted August 31, 2013 Share Posted August 31, 2013 Will this work for Navi's voice? Technically, yes. However, I've had a hard time trying to get the sound to actually sound good. When I use this method for some reason, a lot of clips sound distorted and not very loud. Almost like volume turned way up loud where it is distorted but yet it doesn't sound that loud. I hope that makes sense. But yes, I've replaced Navi's voice with an extremely terrible rendition of Tatl's dinging using this method. Link to comment Share on other sites More sharing options...
Agnostic Priest Posted August 31, 2013 Share Posted August 31, 2013 am i the only one who thought of putting voice dialogue into zelda? 2 Link to comment Share on other sites More sharing options...
Airikita Posted September 2, 2013 Share Posted September 2, 2013 First time success: I will change the pixie sounds when she flies to a bell ringing, but I need to change "Navi"'s name to Uni. Link to comment Share on other sites More sharing options...
!Tommy Posted September 3, 2013 Share Posted September 3, 2013 First time success: I will change the pixie sounds when she flies to a bell ringing, but I need to change "Navi"'s name to Uni. I've never been able to figure it out yet. I guess the only way so far is if you could rip the Navi name in a raw format and locate that hex code in the game? Link to comment Share on other sites More sharing options...
SoulofDeity Posted September 3, 2013 Share Posted September 3, 2013 am i the only one who thought of putting voice dialogue into zelda? well...I'm just saying, but the physical memory map of the n64 in the sdk states that 248MB of address space is for the cartridge data. a decompressed zelda rom is only 64MB, and even much of that it unused as well. wouldn't be easy, but I'm sure its possible. whether or not there are any emulators that can support rom sizes > 64MB is another question. EDIT: just want to put on record: OoT and MM are both 64MB. (64MB + 64MB = 128MB) < 248MB. Link to comment Share on other sites More sharing options...
Airikita Posted September 3, 2013 Share Posted September 3, 2013 First time success: I will change the pixie sounds when she flies to a bell ringing, but I need to change "Navi"'s name to Uni. I've never been able to figure it out yet. I guess the only way so far is if you could rip the Navi name in a raw format and locate that hex code in the game? I've been trying to find Navi's texture for the c-up icon in the game, but I can't find the real one. Ripping the textures from hex is tricky, and varies on byte size and type. I'm getting good at deciphering which ones they could be, but finding them is still a trial-and-error process (especially when ZLE2 doesn't dump them). I found "Navi" in do_action_static, but it's not the right one (possibly beta texture). I need halp!!! Link to comment Share on other sites More sharing options...
Agnostic Priest Posted September 4, 2013 Share Posted September 4, 2013 am i the only one who thought of putting voice dialogue into zelda? well...I'm just saying, but the physical memory map of the n64 in the sdk states that 248MB of address space is for the cartridge data. a decompressed zelda rom is only 64MB, and even much of that it unused as well. wouldn't be easy, but I'm sure its possible. whether or not there are any emulators that can support rom sizes > 64MB is another question. EDIT: just want to put on record: OoT and MM are both 64MB. (64MB + 64MB = 128MB) < 248MB. just some cutscene dialogue? Link to comment Share on other sites More sharing options...
SoulofDeity Posted September 4, 2013 Share Posted September 4, 2013 just some cutscene dialogue? Yeah. Audio files are pretty big, and with speech you can't downsample it too much before it becomes illiterate. Adding new audio to the game would also require relocating and resizing the audio table. Dialog for all cutscenes in the game might not fit into the unused space of the rom. Link to comment Share on other sites More sharing options...
Airikita Posted September 4, 2013 Share Posted September 4, 2013 It also won't be easy to relocate it either, since I attempted to relocate the Audioseq table once and the new ROM location bugged up/didn't work. Link to comment Share on other sites More sharing options...
DarthDub Posted September 6, 2013 Share Posted September 6, 2013 So, in other words, you can't just cut and paste without adjusting accordingly. Link to comment Share on other sites More sharing options...
!Tommy Posted September 6, 2013 Share Posted September 6, 2013 Nope, there are pointers that tell the game exactly where the sound data is located. If you move data, you must change the pointers to reflect that change. Link to comment Share on other sites More sharing options...
mooliecool Posted September 6, 2013 Share Posted September 6, 2013 so does anyone know how to repoint the sounds Link to comment Share on other sites More sharing options...
!Tommy Posted September 7, 2013 Share Posted September 7, 2013 You have to use the N64 Sound Tool 1.1, locate the sound you want to change and it should give you the offset in the actual audiotable (It'll be the offset within the audiotable file, NOT in conjunction with the full ROM) Using a hex editor, search for that offset that if gives you, then once it locates it, change it to the offset you have moved your audio to. Link to comment Share on other sites More sharing options...
Airikita Posted September 7, 2013 Share Posted September 7, 2013 If you move your audio to a new location, you will have to do (start_offset_of_custom_audio) - (start_offset_of_Audioseq) to get your new offset for your audio/music to enter in to Audiotable. Link to comment Share on other sites More sharing options...
Recommended Posts