ff3:ff3us:tutorial:music:songdata

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
ff3:ff3us:tutorial:music:songdata [2018/02/22 08:43]
madsiur [Conclusion]
ff3:ff3us:tutorial:music:songdata [2018/04/22 20:19]
lockirby2
Line 1: Line 1:
-===== Insert Manually a Song Available on the Forum ===== +===== Manually Insert a Song Available on the Forum ===== 
-In this tutorial we'll be importing in FF3us a song that is already in FF6 music format. There is no need for musical knowledge to be able to complete the following steps. The only things that will help is being familiar with the hexadecimal system as well as some basic ROM hacking knowledge like what is an offset, the difference between an absolute and hirom offset and how to use an hex editor.+In this tutorialwe'll be using FF3us to import a song that is already in the FF6 music format. You do not need musical knowledge to complete the following steps. The only thing that will help is being familiar with the hexadecimal system, offsets, the difference between an absolute and HiROM offsetand hex editors.
  
 ==== 1. Getting the file and tool ==== ==== 1. Getting the file and tool ====
-We'll be using the FFIV song [[https://www.ff6hacking.com/misc/songsdata/FF4_prologue.7z|"The Prologue"]] from our [[https://www.ff6hacking.com/forums/thread-2558.html|Song Database]]. The other thing you will need is a hex editor. There are many you can choose from but I'd suggest one that has copy selection, paste-write and paste-insert functionalities. One good all purpose hex editor is {{rh:util:hex:hxd_1.7.7.0.zip|HxD}} and this is what has been used to take the screenshots below.+We'll be using the FFIV song [[https://www.ff6hacking.com/misc/songsdata/FF4_prologue.7z|"The Prologue"]] from our [[https://www.ff6hacking.com/forums/thread-2558.html|Song Database]]. The other thing you will need is a hex editor. There are many you can choose frombut I'd suggest one that has copy selection, paste-writeand paste-insert functionalities. One good all purpose hex editor is {{rh:util:hex:hxd_1.7.7.0.zip|HxD}}and this is what has been used to take the screenshots below.
  
 ==== 2. Files we will be importing ==== ==== 2. Files we will be importing ====
-Extract the files from **FF4_prologue.7z** and you will see the following files:+Extract the files from **FF4_prologue.7z**and you will see the following files:
  
 {{ff3:ff3us:tutorial:music:songdata:sd-song-folder.png}} {{ff3:ff3us:tutorial:music:songdata:sd-song-folder.png}}
  
-**prologue.spc** is the song in SNES format. Those can be played with SPC player or with winamp and a plug-in. For more info on SPC file and how to play them, use Google or check the great [[https://www.fantasyanime.com/extracted-game-music|extracted music tutorial]] at FantasyAnime.com.  **prologue_DATA.bin** and **prologue_INST.bin** are two binary filesthe first has the music data in FF6 format and the other the instruments used in the song. The DATA and INST files do not contain instrument samples, those are in the game.+**prologue.spc** is the song in SNES format. These files can be played with an SPC player or by using winamp and a plug-in. For more info on SPC files and how to play them, use Google or check out the great [[https://www.fantasyanime.com/extracted-game-music|extracted music tutorial]] at FantasyAnime.com.  The DATA and INST files are both binary filesthe former contains the music data in FF6 formatand the latter contains the instruments used in the song. The DATA and INST files do not contain instrument samples, as those are in the game already.
  
-All songs in our song database have the three same files. Some songs, mostly done by tsushiy and having samll "p" next to their title need the instrument patch, available in the same thread. This patch install new BRR samples in the game, giving access to a wider range of instruments to use in songs. Some songs instrument file use those added instruments.This is not the case of our prologue song.  +We provide the same three files for every song in our song database. Some songs (most were made by tsushiy and have a "" next to their title) require the instrument patch, which is available in the same thread. This patch installs new BRR samples in the game, giving access to a wider range of instruments to use in songs. Some song instrument (INST) files use those added instruments. This is not the case with our prologue song, so we do not need to apply the patch in this tutorial.
  
 ==== 3. Choosing the right spot ==== ==== 3. Choosing the right spot ====
Line 32: Line 32:
  
 ==== 4. Verifying the song length ==== ==== 4. Verifying the song length ====
-The next thing to do is verifying if your song fit in the spot you have chosen. If you expanded the song pointers and put your song in expanded ROM, you'll likely won't have to consider the following but some info is still important. Open the **prelude_DATA.bin** file with HxD. The first two bytes (inverted) are the amount of bytes the song take. In our case it is 0x044C bytes, as seen below.+The next thing to do is verifying if your song fit in the spot you have chosen. If you expanded the song pointers and put your song in expanded ROM, you'll likely won't have to consider the following but some info is still important. Open the DATA file with HxD. The first two bytes (inverted) are the amount of bytes the song take. In our case it is 0x044C bytes, as seen below.
  
 {{ff3:ff3us:tutorial:music:songdata:sd-song-length.png}}  {{ff3:ff3us:tutorial:music:songdata:sd-song-length.png}} 
  
-You have to verify the song will not "hit" the next song or the data after. If you locate your song in regular non-expanded ROM but outside the songs block, refer to the [[ff3:ff3us:doc:asm:rom_map|ROM map]] to verify. All you have to do is add to your song offset the song legth and verify it is lower than next data. If you only replace a song by //The Prelude//, check the [[ff3:ff3us:doc:asm:list:music|song list]]. Song are in order that they appear in the ROM. You need to consider the song following yours. I decided we are replacing //"Another World of Beast"//.+You have to verify the song will not "hit" the next song or the data after. If you locate your song in regular non-expanded ROM but outside the songs block, refer to the [[ff3:ff3us:doc:asm:rom_map|ROM map]] to verify. All you have to do is add to your song offset the song length and verify it is lower than next data. If you only replace a song by //The Prelude//, check the [[ff3:ff3us:doc:asm:list:music|song list]]. Song are in order that they appear in the ROM. You need to consider the song following yours. I decided we are replacing //"Another World of Beast"//.
  
 {{ff3:ff3us:tutorial:music:songdata:sd-song-offset.png}} {{ff3:ff3us:tutorial:music:songdata:sd-song-offset.png}}
Line 45: Line 45:
  
 ==== 5. Copying the song data ==== ==== 5. Copying the song data ====
-Copy all the content of **prelude_DATA.bin** (//Ctrl+C//) go to your ROM do //Ctrl+G// and enter "08EFA6". You'll land on the offset you need to paste the song data (//Right-click->Paste-write//). The below two screenshots are the beginning and ed of the song pasted.+Copy all the content of //prelude_DATA.bin// (//Ctrl+C//) go to your ROM do //Ctrl+G// and enter //"08EFA6"//. You'll land on the offset you need to paste the song data (//Right-click->Paste-write//). The below two screenshots are the beginning and ed of the song pasted.
  
 {{ff3:ff3us:tutorial:music:songdata:sd-song-paste-start.png}} {{ff3:ff3us:tutorial:music:songdata:sd-song-paste-ending.png}} {{ff3:ff3us:tutorial:music:songdata:sd-song-paste-start.png}} {{ff3:ff3us:tutorial:music:songdata:sd-song-paste-ending.png}}
Line 69: Line 69:
 {{ff3:ff3us:tutorial:music:songdata:sd-instrument-paste.png}} {{ff3:ff3us:tutorial:music:songdata:sd-instrument-paste.png}}
  
-You'll notice //The Prelude// has 6 instruments. As mentioned previously some songs downloaded from the forum (not a majority) might have incorrect instruments. In such an event, you'll need to assign the correct instruments. There is a complete list of original instruments [[ff3:ff3us:doc:asm:list:instruments|here]]. You'll need to identify each channel instrument and replace what you think are the wrong ones. A bit trial and error but you'll develop your music skills. If you have instruments IDs in your file from $40 and above it mean your song require the instrument patch available in the same thread as the songs. The songs requiring will have a small "p" next to their name. The wrong assigned instruments are often those, because the author added more instruments in his hack without noticing the admins, resulting in instrument indexes above the limit of the patch.+You'll notice //The Prelude// has 6 instruments. As mentioned previously some songs downloaded from the forum (not a majority) might have incorrect instruments. In such an event, you'll need to assign the correct instruments. There is a complete list of original instruments [[ff3:ff3us:doc:asm:list:instruments|here]]. You'll need to identify each channel instrument and replace what you think are the wrong ones. A bit trial and error but you'll develop your music skills. If you have instruments IDs in your file from $40 and above it mean your song require the instrument patch available in the same thread as the songs. The songs requiring will have a "" next to their name. The wrong assigned instruments are often those, because the author added more instruments in his hack without noticing the admins, resulting in instrument indexes above the limit of the patch.
    
 {{ff3:ff3us:tutorial:music:songdata:sd-instrument-new.png}} {{ff3:ff3us:tutorial:music:songdata:sd-instrument-new.png}}
  
 ==== 8. Details on song channels ==== ==== 8. Details on song channels ====
-A thing that differs between songs available on the forum and original songs are the channel pointers in the song. Below is a channel of //The Prelude// and the song at the end loop toward the beginning of the blue section. The last command is F6 02 04 which mean continue by going back to 0x0402 byte after the start of the song. Every song in the original game have these command relative to their offset in the ROM meaning this F6 command would look like as F6 8E F3 ($C8F38E). It would not be exactly this because a song don't redo the first channel commands twice but I talk about this because such a tutorial would not have been possible with an unmodified original song, because when you move it you need to change all the song loop commands and channel pointers at beginning of song data. By having the custom song channel pointers start at 00 00 and not the song offset last two bytes, we easy the process a lot.+A thing that differs between songs available on the forum and original songs are the channel pointers in the song. Below is a channel of //The Prelude// and the song at the end loop toward the beginning of the blue section. The last command is //F6 02 04// which mean continue by going back to 0x0402 byte after the start of the song. Every song in the original game have these command relative to their offset in the ROM meaning this F6 command would look like as //F6 8E F3// ($C8F38E). It would not be exactly this because a song don't redo the first channel commands twice but I talk about this because such a tutorial would not have been possible with an unmodified original song, because when you move it you need to change all the song loop commands and channel pointers at beginning of song data. By having the custom song channel pointers start at 00 00 and not the song offset last two bytes, we easy the process a lot.
  
 {{ff3:ff3us:tutorial:music:songdata:sd-channel.png}} {{ff3:ff3us:tutorial:music:songdata:sd-channel.png}}
  
-Below, a loop command of an original song pointing at $C8F9B9. In the case of a custom song, we would see more or less F6 0X YZ, likely something below 0x0A00.+Below, a loop command of an original song pointing at $C8F9B9. In the case of a custom song, we would see more or less F6 0X XX, likely a number below 0x0A00.
  
 {{ff3:ff3us:tutorial:music:songdata:sd-channel-loop.png}} {{ff3:ff3us:tutorial:music:songdata:sd-channel-loop.png}}
Line 86: Line 86:
 This tutorial was aimed at beginners. The rest of music hacking is harder and require some practice. However it is in the range of anyone having the time and patience to learn. As a conclusion I've made a small video showing the import and at the same time did a little tribute to those who contributed to the song database. This tutorial was aimed at beginners. The rest of music hacking is harder and require some practice. However it is in the range of anyone having the time and patience to learn. As a conclusion I've made a small video showing the import and at the same time did a little tribute to those who contributed to the song database.
  
-==== Result in-game ====+==== 10. Result in-game ====
 {{ff3:ff3us:tutorial:music:songdata:sd-result.mp4?384x336}} {{ff3:ff3us:tutorial:music:songdata:sd-result.mp4?384x336}}
  • ff3/ff3us/tutorial/music/songdata.txt
  • Last modified: 5 years ago
  • (external edit)