Author Topic: Changing music files in a game  (Read 1975 times)

vacantplanets

  • Jr. Member
  • **
  • Posts: 84
Re: Changing music files in a game
« Reply #30 on: February 19, 2017, 11:46:32 AM »
So after all the headache, PDragon was right.  The track has to be the same length as the original.  Now, I did this with the original game file and not the Perfect Arrangement game file.  So I'm not sure if that had anything to do with it.  I do want to look an see if the PA music files stayed the same length or if he extended them when he added the other music.

Nice. I don't understand why some games need you to do this and others don't. For example, I took tracks from Lords of Thunder and replaced every song in Sapphire. I also took tracks from Gate of Thunder and replaced every song in Sapphire with those too. Never had to worry about this shit.

Yeah, the Perfect Arrangement tracks are the same length as the originals.
I'd rather be playing guitar or listening to a PC Engine CD soundtrack.

Currently playing PC Engine, Saturn, and SNES MSU1.

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: Changing music files in a game
« Reply #31 on: February 19, 2017, 12:11:52 PM »
Quote
Nice. I don't understand why some games need you to do this and others don't. For example, I took tracks from Lords of Thunder and replaced every song in Sapphire. I also took tracks from Gate of Thunder and replaced every song in Sapphire with those too. Never had to worry about this shit.

The CD_BIOS has a few ways of playing audio tracks.
The first involves playing by a track number (0-99). To do that, the track number has to be converted to an absolute disc adddress.
The second is actually by absolute disc address (since the routine is already available, see above).

Some games use method one; other games use method two. It depends on what the programmers decided when laying out the cd image.

Magister

  • Full Member
  • ***
  • Posts: 143
Re: Changing music files in a game
« Reply #32 on: February 19, 2017, 12:51:20 PM »
I should mention that when I used Tocfixer before I changed the length of the music file it said that it was too big of a file and aborted the repair.  But, that I could go into Tocfixer's settings and change the size limit allowed or something like that.  I've looked and can't figure out where these changes could be done.  Of course it did say that it might screw things up if they were changed.  But after looking at the length of some of the game tracks, they really aren't that long which sucks.
This Space For Rent.

vacantplanets

  • Jr. Member
  • **
  • Posts: 84
Re: Changing music files in a game
« Reply #33 on: February 19, 2017, 01:13:22 PM »
Quote
Nice. I don't understand why some games need you to do this and others don't. For example, I took tracks from Lords of Thunder and replaced every song in Sapphire. I also took tracks from Gate of Thunder and replaced every song in Sapphire with those too. Never had to worry about this shit.

The CD_BIOS has a few ways of playing audio tracks.
The first involves playing by a track number (0-99). To do that, the track number has to be converted to an absolute disc adddress.
The second is actually by absolute disc address (since the routine is already available, see above).

Some games use method one; other games use method two. It depends on what the programmers decided when laying out the cd image.

Thanks. So is there any way of getting around this when it wants the tracks to have a certain length?

I should mention that when I used Tocfixer before I changed the length of the music file it said that it was too big of a file and aborted the repair.  But, that I could go into Tocfixer's settings and change the size limit allowed or something like that.  I've looked and can't figure out where these changes could be done.  Of course it did say that it might screw things up if they were changed.  But after looking at the length of some of the game tracks, they really aren't that long which sucks.

I never tried it, but all you have to do is open TocFixer.ini with notepad and set "WaveResizeLimitInSeconds=" to whatever you want.
I'd rather be playing guitar or listening to a PC Engine CD soundtrack.

Currently playing PC Engine, Saturn, and SNES MSU1.

TheOldMan

  • Hero Member
  • *****
  • Posts: 958
Re: Changing music files in a game
« Reply #34 on: February 19, 2017, 05:01:34 PM »
Quote
So is there any way of getting around this when it wants the tracks to have a certain length?

There are always ways around those things. The question is, is it worth the time and effort.
No.
...
There are 2 paths someone could take to fix it.
The first would be to change the calls to use track number. Of course, that requires hunting down all the audio triggers, and changing the calls. Then making sure the area for reading the TOC is available. Etc.
The second would be to build an iso image with the audio in place, and using the offsets in the new image for the calls. Of course, you would have to do that every time you changed the track lengths.

Can it be done? Yes. Would it be easy? Not unless you know a -lot- about both the game and the cd layout.

Magister

  • Full Member
  • ***
  • Posts: 143
Re: Changing music files in a game
« Reply #35 on: February 20, 2017, 10:07:39 AM »
I never tried it, but all you have to do is open TocFixer.ini with notepad and set "WaveResizeLimitInSeconds=" to whatever you want.

That's all fine if I understood what it means.  In the notepad it's set to 3 right now.  Not sure what the 3 equals.  Can I just use 0 to make it unlimited?
This Space For Rent.

vacantplanets

  • Jr. Member
  • **
  • Posts: 84
Re: Changing music files in a game
« Reply #36 on: February 20, 2017, 10:13:01 AM »
I never tried it, but all you have to do is open TocFixer.ini with notepad and set "WaveResizeLimitInSeconds=" to whatever you want.

That's all fine if I understood what it means.  In the notepad it's set to 3 right now.  Not sure what the 3 equals.  Can I just use 0 to make it unlimited?

No, I believe it's the number of seconds difference between the original track length and the new one.
I'd rather be playing guitar or listening to a PC Engine CD soundtrack.

Currently playing PC Engine, Saturn, and SNES MSU1.