News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Chrono Trigger MusiCompanion [v1.3]  (Read 44107 times)

Giro

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.1]
« Reply #20 on: July 03, 2010, 03:04:48 am »
Great job Zarra!

Next Gen Cowboy

  • Hero Member
  • *****
  • Posts: 1766
  • "People are like dice"
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.1]
« Reply #21 on: July 03, 2010, 11:40:21 pm »
This truly is an awesome project, it is so far out of the norm that it just strikes me as amazing. You did a great job on this, and you picked something that is not only useful, but truly interesting.
"Remember when we were in Japan? You said you were my gun, if you're the gun then that means I'm the bullet."

"All my life I've been waiting for the gunpowder to go off, you know what you need to ignite gunpowder? You need a gun."

Psychlonic

  • Sr. Member
  • ****
  • Posts: 403
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.1]
« Reply #22 on: July 07, 2010, 04:14:11 pm »
This is nothing short of awesome. This is an idea which could apply to so many games out there that have extensive amounts of remixed/remastered music floating around. In an ideal world, there would be a bare bones function available for anyone willing to chop up their PSX video files and insert them strategically where appropriate. Obviously that's out of the scope of this idea, just day dreaming I guess.
Just another old and grumpy gamer. Don't mind me.

zarradeth

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
    • zarradeth.wordpress.com
Re: Chrono Trigger MusiCompanion [v1.1]
« Reply #23 on: July 08, 2010, 12:04:22 am »
This is nothing short of awesome. This is an idea which could apply to so many games out there that have extensive amounts of remixed/remastered music floating around. In an ideal world, there would be a bare bones function available for anyone willing to chop up their PSX video files and insert them strategically where appropriate. Obviously that's out of the scope of this idea, just day dreaming I guess.

Given how the SPC-700 operates, I think it would be definitely doable to make something like CTM for other SNES games. But it would require a tremendous amount of work, and little from CTM would be reusable.

For those that don't know- the SPC-700 is a seperate processor from the SNES's main CPU. And communications between these two processors occurs over 4 ports. Thus, the CPU sends commands, parameters, uploads information, etc. over these 4 ports. Thus if you know how a game's music/sound engine works (since in most causes these are probably custom written programs, since the SPC-700 is operating a program uploaded by the game when the game first starts), you can understand what the game is doing from a spectators perspective. For example, Chrono Trigger sends the command 0x10 (and some parameters of course) to the first APU port to trigger a song change, 0x14 is a song interrupt, 0x11 usually resumes from interrupts, 0x81 is a volume change, 0x18 is a sound effect, etc. etc.
(If you wanna see these happening with a game, use a debug emulator and set write breakpoints on $2140 - $2143-- those are the hardware registers for the APU ports.)

Now catching some of these when they occur can be hard because they happen so fast. I had this issue for a while-- especially when I decided I needed to support volume changes. I would only be able to catch, like, 1 out of 25 of those. So that's where my 'special code' comes in. I patch subroutines that do volume changes, song changes, etc. They then jump to my code, copy the command and its parameters to the end of RAM (this is free generally, but the overworld does decompress graphics here. But after multiple playthroughs of both Prophet's Guile and Chrono Trigger- I have never seen any side effects). And from here I can access them at my leisure. Implementing this solved a lot of problems and let me clean a lot of stuff up.

But, there are times that you have to account for the programmers pulling some funny tricks. I know that sounds kinda odd or vague, but you never know what a game does. For example, the songs 0x3F and 0x50 (off the top of my head, I could be wrong) write to the APU out ports and allow scenes to be synced to the music. This is why the Epoch and Credits fix both exist. If 0x50 isn't played during the Epoch scene (taking the Epoch to 1999AD), the out port values will never be written and the game will hang while waiting for the out port values to be written. Even if you change the song to a different one using Temporal Flux, the scene will hang- it has to be those exact songs (actually, you could probably play 0x3F during the Epoch scene and it would work, but the timing would be broken). As for the credits scene, it is used to time the credits- and if values are never written the timing will be off and it will hang at a certain part of the credits (but 0x50 couldn't be used here, it doesn't write enough values over the span of itself playing).

TL;DR or to sum things up,
I believe it would definitely be possible to make something like CTM for other games, but it would require a ton of work, and little could be taken from CTM. And along with all the work would be a lot of testing-- I tested CTM myself and after playing through Chrono Trigger 5 times (end to end, got every ending as well and twice did all the side quests) I was pretty burnt out :P. But I would definitely be excited to see anyone pick up a similar project for another game, I would even be willing to help them.
« Last Edit: July 08, 2010, 12:15:05 am by zarradeth »

odditude

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.1]
« Reply #24 on: July 08, 2010, 09:33:05 am »
you should check out the 21fx work on byuu's board.

Nerd42

  • Full Member
  • ***
  • Posts: 244
    • View Profile
    • DJ Nerd42
Re: Chrono Trigger MusiCompanion [v1.1]
« Reply #25 on: August 21, 2010, 11:33:35 am »
wow this is really cool

tcaudilllg

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.1]
« Reply #26 on: August 21, 2010, 12:42:27 pm »
It would be fully worth creating a PC/SNES hybrid just for projects like this. (or would it?)

Nerd42

  • Full Member
  • ***
  • Posts: 244
    • View Profile
    • DJ Nerd42
Re: Chrono Trigger MusiCompanion [v1.1]
« Reply #27 on: August 21, 2010, 01:13:48 pm »
It would be fully worth creating a PC/SNES hybrid just for projects like this. (or would it?)
What do you mean by a PC/SNES hybrid?

So ... I can use this music companion thing to replace the CT soundtrack with whatever kinda soundtrack I want?? Ooh I wanna do a Chrono Tied version :)
« Last Edit: August 22, 2010, 04:59:42 pm by Nerd42 »

zarradeth

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
    • zarradeth.wordpress.com
Re: Chrono Trigger MusiCompanion [v1.1]
« Reply #28 on: September 14, 2010, 07:16:21 pm »
Update! Now on version 1.2. This has been sitting on my harddrive for a little while, but I'm finally now getting around to releasing it-- but it isn't nothing too major.

Changes:
9/5/10 - v1.2
Fixed a couple typos (both in code comments and console output).
Song paths are now checked to make sure files exist, if they don't they are set back to NULL, preventing crashes.
CTM will now terminate itself if it fails to initalize the required irrKlang engines for any reason.

One thing to note, the readme stated that if you had a song path incorrect in your tracklist there would just be silence. This is a lie! This use to be the case, but later in development I changed how irrKlang loaded the music to make other things possible/easier (This is the same change that caused CTM to leak massive amounts of memory, but I caught that before I ever released CTM). With the changes CTM would crash if you had the file path incorrect. Now CTM checks all your file paths and if one doesn't exist it will let you know (only if you have the console enabled!) and then set the path back to NULL- thus silencing the track. If you dislike having the console enabled, you should at least use it when setting up your replacement sound track to make sure everything is working okay. The funny thing is the first time I implemented this, I found an error with a soundtrack I was testing and though was perfect (gotta love that :D).

Link: http://www.megaupload.com/?d=0WKAOZZ1
Main post will get updated too.

It would be fully worth creating a PC/SNES hybrid just for projects like this. (or would it?)
What do you mean by a PC/SNES hybrid?

So ... I can use this music companion thing to replace the CT soundtrack with whatever kinda soundtrack I want?? Ooh I wanna do a Chrono Tied version :)

Yes, you totally could use your album in-game. And you could release a version of your album for use with CTM (by including a completed TrackList.txt file with it) too!

Nerd42

  • Full Member
  • ***
  • Posts: 244
    • View Profile
    • DJ Nerd42
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #29 on: September 14, 2010, 07:30:27 pm »
Cool! The trouble is I'd have to do at least three versions: one for the main game, one for Prophet's Guile and one for Crimson Echoes WHEN (not if, but WHEN. Trust me, I know these things) the final final version comes out.

I don't know much about the difficulty of the programming involved, but might there eventually be a more general tool that will work for making alternative soundtracks to any SNES game based on info files specific to each game? In other words, take this and put anything Chrono Trigger specific in a game-specific info file and make up a standard file format for similar info files to other games. I had an idea a long time ago to do an alternative soundtrack of the Wizard of Oz SNES game with Pink Floyd music, ya know like Dark Side of the Rainbow only interactive. I think it would make that game actually worth playing LOL :)
« Last Edit: September 14, 2010, 07:38:30 pm by Nerd42 »

DarkSol

  • Forum Moderator
  • Sr. Member
  • *****
  • Posts: 288
  • IRC Administrator
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #30 on: September 14, 2010, 07:41:45 pm »
Cool! The trouble is I'd have to do at least three versions: one for the main game, one for Prophet's Guile and one for Crimson Echoes WHEN (not if, but WHEN. Trust me, I know these things) the final final version comes out.
Crimson Echoes being released is a hoax.  Trust me, I know these things.  8)
It is wrong to try to avoid the struggle against imperialism under the pretext that independence and revolution are important, but that peace is still more precious.

zarradeth

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
    • zarradeth.wordpress.com
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #31 on: September 14, 2010, 08:00:01 pm »
I don't know much about the difficulty of the programming involved, but might there eventually be a more general tool that will work for making alternative soundtracks to any SNES game based on info files specific to each game? In other words, take this and put anything Chrono Trigger specific in a game-specific info file and make up a standard file format for similar info files to other games. I had an idea a long time ago to do an alternative soundtrack of the Wizard of Oz SNES game with Pink Floyd music, ya know like Dark Side of the Rainbow only interactive. I think it would make that game actually worth playing LOL :)

Well, like I've said before- this isn't something that can easily be changed to work on other games. I could probably get it working on FF5 without too much trouble and a couple other games, because it seems to use a very similar SPC core as CT (hence why the music is interchangeable)(and for fun I once tried using CTM on Radical Dreamers, it didn't work- the SPC cores are similar, but all the commands for executing changes are different). But there would probably be a lot of kinks that need to be worked out. Along with the fact that most games probably have some radically different SPC cores that all behave in their own strange ways. I had to write and modify subroutines within Chrono Trigger so that I can get information about music changes from CT at my leisure. Before I did those changes, even when hammering the CPU (not sleeping CTM- constantly scanning memory - and I have a 3.4GHz dual core) I would get song changes ~90% of the time, and NEVER could catch volume changes, they happened too fast and weren't in memory long enough for me to catch. Going into CTM I had a plan and it was all suppose to be simple, but it turned out to be much more complex than I ever expected.

Also, depending on the SPC Core, and the fact the the SPC-700 is another processor, it can do more than just play music. Hence why CTM has the credits and Epoch fix- without those, the game hangs. It took me a long time to figure out what was going on the first time I encountered the hang, and it was a headache and a half to figure it out and solve it- the song is actually coded to write values to the APU ports so that the CPU can scan for those values and sync the game to the music. So I had to emulate those in order for the game to work.

It seems like a simple task (I originally though it would be), but it isn't. I was originally gonna have a friend write CTM for me (before I knew how to program), but he never got around to it. Here were my notes for him on how CTM needs to work: http://pastebin.com/tBZxtw76. In retrospect, if he had written it for me, it never would have worked. Aside from the pointers, none of those notes are relevant anymore- they either didn't work, or I had to do stuff a different way because I couldn't read the values fast enough. Also, looking back over my notes, 82 and 83 aren't volume changes, and 11 can be used for playing a song as well. Oh, and the pointers are wrong too now that I look at them...

Nerd42

  • Full Member
  • ***
  • Posts: 244
    • View Profile
    • DJ Nerd42
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #32 on: September 15, 2010, 09:41:46 am »
Aw, that's too bad.

Cool! The trouble is I'd have to do at least three versions: one for the main game, one for Prophet's Guile and one for Crimson Echoes WHEN (not if, but WHEN. Trust me, I know these things) the final final version comes out.
Crimson Echoes being released is a hoax.  Trust me, I know these things.  8)
No, it's for real. None of the original people are involved but it's for real.

bobonga

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #33 on: September 15, 2010, 09:56:27 am »
No, it's for real. None of the original people are involved but it's for real.

I think I see what you're referring to but that's not Crimson Echoes, that's a different hack based on it. They have a different story and all. They even got human Glenn inserted but he has a limp and speaks like a retard

EDIT: heres the link: http://www.vidyagamez.com/forum/viewtopic.php?f=4&t=78&start=150

justin3009

  • Hero Member
  • *****
  • Posts: 1625
  • Welp
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #34 on: September 15, 2010, 01:26:34 pm »
There's more than one Crimson Echoes project going on..I can name at least 3 of them off the top of my head that are being worked.  They'll be released eventually, but right now they're all going deathly slow.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

Nerd42

  • Full Member
  • ***
  • Posts: 244
    • View Profile
    • DJ Nerd42
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #35 on: September 15, 2010, 01:44:04 pm »
There's more than one Crimson Echoes project going on..I can name at least 3 of them off the top of my head that are being worked.  They'll be released eventually, but right now they're all going deathly slow.
Yeah, what he said. I don't think the one linked to is the same one I'm following at all. If these come to fruition, will it be difficult to keep MusicCompanion compatible with all of them?

justin3009

  • Hero Member
  • *****
  • Posts: 1625
  • Welp
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #36 on: September 15, 2010, 03:17:39 pm »
I think I remember him saying it semi-worked with Prophet's Guile and it worked with Crimson Echoes..Although don't quote me on that.  I think it works on one or the other, but that won't be confirmed until he says so himself.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'

zarradeth

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
    • zarradeth.wordpress.com
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #37 on: September 15, 2010, 06:11:45 pm »
I think I remember him saying it semi-worked with Prophet's Guile and it worked with Crimson Echoes..Although don't quote me on that.  I think it works on one or the other, but that won't be confirmed until he says so himself.

It worked fine on Prophet's Guile, I actually tested with PG a lot since it's a much shorter playthrough that the original CT. The only issue is that there are a couple of bugs with the music (The Devs' faults, not CTM's) that are barely noticeable when playing it without CTM, but are really noticeable when using CTM. (Oh yeah, and the music track they replaced for Mount Woe is Gato's Song, so without custom music (I was using MP3s of the OST I had made), that can quickly drive you insane).  I did a few things with CTM to make sure it would be compatible with any and all ROM hacks for Chrono Trigger (like how I don't just patch my code, I search around the ROM and look for places to patch my code, the patching is kinda dynamic). The only way I can think of for a ROM hack to get screwed up by CTM would be if they repointered some music to data and I attempted to use that pointer as a potential place to put my own code, but I don't see why they would do that anyways-- unless they aren't using that song in their hack and don't bother repointering the song- but there isn't anything I can really do to make sure that the music pointers are actually pointing to music.

Nerd42

  • Full Member
  • ***
  • Posts: 244
    • View Profile
    • DJ Nerd42
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #38 on: September 18, 2010, 01:08:21 pm »
Wow, this is really awesome. Here's the TrackList.txt you can use to add "Chrono Tied" music to Chrono Trigger. There's only one spot for "Kingdom Trial" otherwise I would also have added "Chrono Trigger Takes All My Moneys".
Quote
02 = music/Chrono Tied/02 Remember the Wind Scene - DJ Nerd42.mp3; 1
03 = music/Chrono Tied/03 Right Now Time Circuits - DJ Nerd42.mp3; 1
05 = music/Chrono Tied/09 Cigs in a Ruined World - DJ Nerd42.mp3; 1
08 = music/Chrono Tied/08 Back Home with the Secret of the Forest - DJ Nerd42.mp3; 1
0F = music/Chrono Tied/13 Kenjis Morning Sunlight - DJ Nerd42.mp3; 1
14 = music/Chrono Tied/16 Schala Out the Back - DJ Nerd42.mp3; 1
17 = music/Chrono Tied/05 Feel Like Kingdom Trial - DJ Nerd42.mp3; 1
18 = music/Chrono Tied/15 Determination Like This - DJ Nerd42.mp3; 1
1D = music/Chrono Tied/11 Get Me Gone At the Bottom of Night - DJ Nerd42.mp3; 1
1E = music/Chrono Tied/06 Whered You Go on a Peaceful Day - DJ Nerd42.mp3; 1
26 = music/Chrono Tied/10 The Day the World Believed Me - DJ Nerd42.mp3; 1
27 = music/Chrono Tied/12 Johnnys High Road - DJ Nerd42.mp3; 1
28 = music/Chrono Tied/14 Magus Red to Black - DJ Nerd42.mp3; 1
2F = music/Chrono Tied/04 Petrified in the Underground Sewer - DJ Nerd42.mp3; 1
30 = music/Chrono Tied/01 Chrono Tied Premonition - DJ Nerd42.mp3; 1
31 = music/Chrono Tied/19 Hard Way to the Undersea Palace - DJ Nerd42.mp3; 1
42 = music/Chrono Tied/17 Gatos Gonna Be Somebody - DJ Nerd42.mp3; 1
45 = music/Chrono Tied/18 There They Go to the Random Battle - DJ Nerd42.mp3; 1
46 = music/Chrono Tied/07 Tyran In Stereo - DJ Nerd42.mp3; 1
50 = music/Chrono Tied/15 Determination Like This - DJ Nerd42.mp3; 1

Hey here's a feature request or suggestion. Don't know if you might have thought of this but it would be cool if Tracklist.txt could specify more than one replacement song for a single Chrono Trigger song: It could play them in a random order or in order or a number of different things. Just an idea. That would enable me to add both "Feels Like Kingdom Trial" AND "Chrono Trigger Takes All My Moneys"
« Last Edit: September 18, 2010, 01:13:30 pm by Nerd42 »

Hayden

  • Jr. Member
  • **
  • Posts: 23
  • ITS BRITNEY B*TCH!
    • View Profile
Re: Chrono Trigger MusiCompanion [v1.2]
« Reply #39 on: October 23, 2010, 03:16:59 pm »
I don't know much about the difficulty of the programming involved, but might there eventually be a more general tool that will work for making alternative soundtracks to any SNES game based on info files specific to each game? In other words, take this and put anything Chrono Trigger specific in a game-specific info file and make up a standard file format for similar info files to other games. I had an idea a long time ago to do an alternative soundtrack of the Wizard of Oz SNES game with Pink Floyd music, ya know like Dark Side of the Rainbow only interactive. I think it would make that game actually worth playing LOL :)

Well, like I've said before- this isn't something that can easily be changed to work on other games. I could probably get it working on FF5 without too much trouble and a couple other games, because it seems to use a very similar SPC core as CT (hence why the music is interchangeable)(and for fun I once tried using CTM on Radical Dreamers, it didn't work- the SPC cores are similar, but all the commands for executing changes are different). But there would probably be a lot of kinks that need to be worked out. Along with the fact that most games probably have some radically different SPC cores that all behave in their own strange ways. I had to write and modify subroutines within Chrono Trigger so that I can get information about music changes from CT at my leisure. Before I did those changes, even when hammering the CPU (not sleeping CTM- constantly scanning memory - and I have a 3.4GHz dual core) I would get song changes ~90% of the time, and NEVER could catch volume changes, they happened too fast and weren't in memory long enough for me to catch. Going into CTM I had a plan and it was all suppose to be simple, but it turned out to be much more complex than I ever expected.

Also, depending on the SPC Core, and the fact the the SPC-700 is another processor, it can do more than just play music. Hence why CTM has the credits and Epoch fix- without those, the game hangs. It took me a long time to figure out what was going on the first time I encountered the hang, and it was a headache and a half to figure it out and solve it- the song is actually coded to write values to the APU ports so that the CPU can scan for those values and sync the game to the music. So I had to emulate those in order for the game to work.

It seems like a simple task (I originally though it would be), but it isn't. I was originally gonna have a friend write CTM for me (before I knew how to program), but he never got around to it. Here were my notes for him on how CTM needs to work: http://pastebin.com/tBZxtw76. In retrospect, if he had written it for me, it never would have worked. Aside from the pointers, none of those notes are relevant anymore- they either didn't work, or I had to do stuff a different way because I couldn't read the values fast enough. Also, looking back over my notes, 82 and 83 aren't volume changes, and 11 can be used for playing a song as well. Oh, and the pointers are wrong too now that I look at them...

Can you make a Youtube Video of a Tutorial? i am keep having problems and i have no idea what TO do.
CT:Citsym Currently being worked on, if you would like to help meh that would be nice, either find my Topic or just PM me, Well If you help me Thank you,*Cough* Probaly you wont *Cough* You better anyway, i am doing this for CT fans and the only person working on it is me Well Me At The Moment!