Author Topic: Playing around with some SPC code in ROMs is fun!  (Read 22563 times)

BROJ

  • CC:DBT Dream Team
  • Errare Explorer (+1500)
  • *
  • Posts: 1567
    • View Profile
Re: Playing around with some SPC code in ROMs is fun!
« Reply #135 on: April 09, 2008, 07:57:26 pm »
I've been interested in contributing to this thread. How would one get started with spc conversion and maybe 'by-hand' conversion for 'non-Square' games. I have hexadecimal experience and I realize there is a utility for modifying instrument indexes, but other than that I'm at a little bit of a loss...

JCE3000GT

  • Guardian (+100)
  • *
  • Posts: 114
    • View Profile
    • BlitzKrieg Innovations
Re: Playing around with some SPC code in ROMs is fun!
« Reply #136 on: April 09, 2008, 09:00:52 pm »
Hey, what do you think is the best way of resolving the F7 xx yy and F8 xx yy problem?
Your way is replacing the commands with F2's, which use 1 parameter, same as F7 and F8 in some of the later SPCs.
Shinrin's seems to be changing a 00 after the F8 to a 8B.
Mine is expanding them and changing all the pointers in the SPC to match.

I've already forgotten what I thought those commands did.  Either way the probable best thing to do is delete those commands repoint the SPC.  ?

Shinrin

  • Chrono Trigger Threads of Time
  • Squaretable Knight (+400)
  • *
  • Posts: 487
  • Chrono Trigger Fan # 100
    • View Profile
    • Shinrin Cole
Re: Playing around with some SPC code in ROMs is fun!
« Reply #137 on: April 10, 2008, 01:39:41 am »
I've been interested in contributing to this thread. How would one get started with spc conversion and maybe 'by-hand' conversion for 'non-Square' games. I have hexadecimal experience and I realize there is a utility for modifying instrument indexes, but other than that I'm at a little bit of a loss...

Not all SNES music can be transplanted from one snes game to another, different companies use diffrent SPC stuff. Though Math on napkins did put CT music in LoZ after doing some hacking.

I got a spc of a imported FF5 song. but if you litsen to it, then you'll know it didn't work in CT ;)

[attachment deleted by admin]

BROJ

  • CC:DBT Dream Team
  • Errare Explorer (+1500)
  • *
  • Posts: 1567
    • View Profile
Re: Playing around with some SPC code in ROMs is fun!
« Reply #138 on: April 10, 2008, 01:43:55 am »
Not all SNES music can be transplanted from one snes game to another, different companies use diffrent SPC stuff. Though Math on napkins did put CT music in LoZ after doing some hacking.
Yeah, I heard that example spc. I was just wondering if there were any pointers, help, or tutorials you could give me so I could get "into the loop", so to speak. I suppose what I meant for the latter wasn't 'convert', but rather re-compose.


« Last Edit: April 10, 2008, 01:47:41 am by BROJ »

Shinrin

  • Chrono Trigger Threads of Time
  • Squaretable Knight (+400)
  • *
  • Posts: 487
  • Chrono Trigger Fan # 100
    • View Profile
    • Shinrin Cole
Re: Playing around with some SPC code in ROMs is fun!
« Reply #139 on: April 10, 2008, 12:57:32 pm »
Not all SNES music can be transplanted from one snes game to another, different companies use diffrent SPC stuff. Though Math on napkins did put CT music in LoZ after doing some hacking.
Yeah, I heard that example spc. I was just wondering if there were any pointers, help, or tutorials you could give me so I could get "into the loop", so to speak. I suppose what I meant for the latter wasn't 'convert', but rather re-compose.

Look in the Encyclopedia on the site under modifications, there should be a link for tutorials under it.

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
Re: Playing around with some SPC code in ROMs is fun!
« Reply #140 on: April 10, 2008, 03:51:52 pm »
He seems to be asking how to compose songs, which the encyclopedia doesn't have any info on.
Edit-
I realized he did ask about normal conversion, which we do have info on.
« Last Edit: April 10, 2008, 04:19:33 pm by Vehek »

BROJ

  • CC:DBT Dream Team
  • Errare Explorer (+1500)
  • *
  • Posts: 1567
    • View Profile
Re: Playing around with some SPC code in ROMs is fun!
« Reply #141 on: April 10, 2008, 10:47:45 pm »
Look in the Encyclopedia on the site under modifications, there should be a link for tutorials under it.
He seems to be asking how to compose songs, which the encyclopedia doesn't have any info on.
Edit-
I realized he did ask about normal conversion, which we do have info on.
Thanks! :D

Edit: This is really neat!  :)
« Last Edit: April 10, 2008, 11:09:43 pm by BROJ »

MathOnNapkins

  • Iokan (+1)
  • *
  • Posts: 13
    • View Profile
Re: Playing around with some SPC code in ROMs is fun!
« Reply #142 on: April 15, 2008, 03:20:10 pm »
Hey, what do you think is the best way of resolving the F7 xx yy and F8 xx yy problem?
Your way is replacing the commands with F2's, which use 1 parameter, same as F7 and F8 in some of the later SPCs.
Shinrin's seems to be changing a 00 after the F8 to a 8B.
Mine is expanding them and changing all the pointers in the SPC to match.

I guess I didn't post this before.

http://math.arc-nova.org/ctriggerv4.log

This document tells you what each music command does in Chrono Trigger. It's a disassembly, so it doesn't really tell you how to compose a song... though I suppose I could whip that up fairly quickly. Just search for "command f8" or "command f7". Now, if you're taking about importing from another Squaresoft game, even a game as similar as FFVI will have slightly different commands and you will have to transcode (as I'm sure most have you have already figured out.)

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
Re: Playing around with some SPC code in ROMs is fun!
« Reply #143 on: April 15, 2008, 06:52:23 pm »
Thanks.

I don't know if they do the same thing or not, but the F7 & F8 commands in RS3 and other later games take only one argument.
Quote from: MathOnNapkin's disassembly
dw SetEchoFB   ; command F7 (2 args), sets echo feedback volume to gradually change over time (if first parameter is zero, just sets EFB)

dw SetFirCoeff   ; command F8 (2 args), sets the echo FIRx (echo filter) coefficients for all 8 voices and optionally slide. (if the first byte is zero it just sets it as fixed)
I don't think I'd personally notice the effects of these.

JCE3000GT

  • Guardian (+100)
  • *
  • Posts: 114
    • View Profile
    • BlitzKrieg Innovations
Re: Playing around with some SPC code in ROMs is fun!
« Reply #144 on: April 15, 2008, 08:41:32 pm »
Thanks.

I don't know if they do the same thing or not, but the F7 & F8 commands in RS3 and other later games take only one argument.
Quote from: MathOnNapkin's disassembly
dw SetEchoFB   ; command F7 (2 args), sets echo feedback volume to gradually change over time (if first parameter is zero, just sets EFB)

dw SetFirCoeff   ; command F8 (2 args), sets the echo FIRx (echo filter) coefficients for all 8 voices and optionally slide. (if the first byte is zero it just sets it as fixed)
I don't think I'd personally notice the effects of these.


Me either, sometimes I wonder if some of these were even finshed code-wise? 

*edit*
Are you guys using my sample index editor?  If so has it made it easier?
« Last Edit: April 15, 2008, 08:43:50 pm by JCE3000GT »

MathOnNapkins

  • Iokan (+1)
  • *
  • Posts: 13
    • View Profile
Re: Playing around with some SPC code in ROMs is fun!
« Reply #145 on: April 16, 2008, 09:15:41 am »
JCE3000GT & Vehek: You might have a hard time hearing them if you're just listening to one song, but if you compared two SPCs with different echo feedback volume and fir coefficient settings you would hear a difference. It's one of the reasons that my imports from Chrono Trigger to Zelda don't sound totally accurate yet (among other small details). And yes, I have verified that they are finished code.

I've personally not looked at RS3's engine but every Square engine should have a table of routines like the one I've laid out for Chrono Trigger. The trick is finding them in each engine as they are never at the same exact location. Basically the methodology I use is to look at the code for two "Push A" instructions close together followed by a "RET", as this is the only way on the SPC to set up a jump table (i.e. a table of function pointers).
« Last Edit: April 16, 2008, 01:31:34 pm by MathOnNapkins »

JCE3000GT

  • Guardian (+100)
  • *
  • Posts: 114
    • View Profile
    • BlitzKrieg Innovations
Re: Playing around with some SPC code in ROMs is fun!
« Reply #146 on: April 17, 2008, 11:36:09 pm »
JCE3000GT & Vehek: You might have a hard time hearing them if you're just listening to one song, but if you compared two SPCs with different echo feedback volume and fir coefficient settings you would hear a difference. It's one of the reasons that my imports from Chrono Trigger to Zelda don't sound totally accurate yet (among other small details). And yes, I have verified that they are finished code.

I've personally not looked at RS3's engine but every Square engine should have a table of routines like the one I've laid out for Chrono Trigger. The trick is finding them in each engine as they are never at the same exact location. Basically the methodology I use is to look at the code for two "Push A" instructions close together followed by a "RET", as this is the only way on the SPC to set up a jump table (i.e. a table of function pointers).

RS3 seems to be only a slightly different than CT if memory serves.  Infact I believe I only found one or two commands different--one new and the other a change.  What puzzles me is why RS2 (not RS3) seems to be so radically different from its SPC core cousin FF6.  Its more coser to RS3 than it is FF6 infact.  I can't remember if I submitted this or not...but here it is anyway.  The trumpet needs to get fixed...as well as the loop.  RS2 almost perfectly imports without much editing.  Once my job+financial situation+car problem gets at least resolved I plan on jumping back in my projects. 

[attachment deleted by admin]

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
Re: Playing around with some SPC code in ROMs is fun!
« Reply #147 on: May 06, 2008, 08:49:10 pm »
A few days ago, I was looking at some RS3 stuff at GameFAQS and got reminded that there are some very big hacks of RS3 in Japan.
http://www.youtube.com/watch?v=OCv2sVk_4Nk
Hear that different music? I haven't found out much, but apparently there's a music importer for RS3.
I've attached a SPC I dumped from one of the hacks.

[attachment deleted by admin]

JCE3000GT

  • Guardian (+100)
  • *
  • Posts: 114
    • View Profile
    • BlitzKrieg Innovations
Re: Playing around with some SPC code in ROMs is fun!
« Reply #148 on: May 07, 2008, 09:52:33 pm »
A few days ago, I was looking at some RS3 stuff at GameFAQS and got reminded that there are some very big hacks of RS3 in Japan.
http://www.youtube.com/watch?v=OCv2sVk_4Nk
Hear that different music? I haven't found out much, but apparently there's a music importer for RS3.
I've attached a SPC I dumped from one of the hacks.

He had much better luck than me that's for sure.  Infact he improved the song quite alot over the original.  I like his or her version better.  But I'm still proud of my FF6 Battle import.  :D

[attachment deleted by admin]

Shinrin

  • Chrono Trigger Threads of Time
  • Squaretable Knight (+400)
  • *
  • Posts: 487
  • Chrono Trigger Fan # 100
    • View Profile
    • Shinrin Cole
Re: Playing around with some SPC code in ROMs is fun!
« Reply #149 on: June 03, 2008, 11:22:34 am »
Now this isn't anything to have to do importing a song into CT, but deals with a song in CT itself, Schala's theme. If played for a really long time, the song De syncs. Lenophis mention this to me a few months back, and i just decided to check it out, and after it's been playing for... 504 minutes it sounds quite off.