News: 11 March 2016 - Forum Rules

Author Topic: A great way to find the music in a nes game  (Read 1852 times)

DANGER X

  • Full Member
  • ***
  • Posts: 167
  • Nes hacker & player
    • View Profile
    • Deadpool Nes
A great way to find the music in a nes game
« on: April 06, 2017, 03:51:22 am »

nesrocks

  • Hero Member
  • *****
  • Posts: 732
    • View Profile
    • nesrocks.com
Re: A great way to find the music in a nes game
« Reply #1 on: April 06, 2017, 09:28:44 am »
So, like this. It's easier to see in video form though.

Fceux's debugging tools are way better than blindly trying to figure out where a song is. Here is how:

1 - Open fceux, open the ROM on it.
2 - Start level 1 (in case you want to find level 1 music)
3 - Stand still in a spot where nothing happens and you can listen to the music. Now Open the Code/Data Logger, hit "Reset Log" and then hit "Start". Then you click "save stripped data" and save it to a file. Name it "file 1.nes" or something.
4 - Now let the music play for a couple of seconds and click "save stripped data" again. Save the file to "file 2.nes".
5 - Now get your favorite hex editting program that can compare files. I use Hex workshop. In it, you can open two files to compare them. You will choose file 1.nes and file 2.nes and it will tell you the difference between them. You skip to the next difference until you find a relatively very different spot.
6 - Now go to fceux, open the debug - hex editor, select "view" - "rom file" and scroll to the same address where hex workshop indicated a difference. If it is lit as blue, this must be the song. Change it to all FF and reset the game and see if the music is now silent or has a silent channel.
7 - If it has, then you can go to stage 1, stand still on a spot, reset the code data logger and start it. Let the game play the song for a while to make sure it has read all the notes in the song (it reads each one in real time). Then pause the emulator and go back to the hex editor and you will see exactly the whole song lit as blue (data). No need to guess where it is by ramdomly corrupting areas...

Of course, depending on the ROM size (big ROMS are more boring to scroll) you can skip the hex workshop and simply skip to step 7, pause the emulator and then scroll the hex editor until you find an area with a big chunk of blue bytes. Big chances are this is the music.

DANGER X

  • Full Member
  • ***
  • Posts: 167
  • Nes hacker & player
    • View Profile
    • Deadpool Nes
Re: A great way to find the music in a nes game
« Reply #2 on: April 06, 2017, 06:37:12 pm »
I can't believe we had the same idea, I gotta recognize I read what you said a while ago, but I didn't understood well, maybe some of the text got stuck in my memory  :laugh:

nesrocks

  • Hero Member
  • *****
  • Posts: 732
    • View Profile
    • nesrocks.com
Re: A great way to find the music in a nes game
« Reply #3 on: April 06, 2017, 07:44:46 pm »
:) That's good then!