Custom Final Dungeon music for LTTP

Go down

Custom Final Dungeon music for LTTP Empty Custom Final Dungeon music for LTTP

Post by Hal_Emmerich Mon 21 Nov 2016 - 13:27

The experiment: Can we -add- a song or songs to the LTTP soundtrack, to be used in the final dungeon?

This may be regarded as a n00b question, probably because when it comes to the romhacking scene I am. I do have a programming background. I'm asking for clarification not because it's something revolutionary that hasn't been done before, but rather because it's something I intend to try and I'd like to know if I've got the right idea before I begin and there isn't a hell of a lot of documentation.

It's always bothered me that the final dungeon in Link to the Past just used the stock dark world dungeon theme - as great of a theme as it is, the final dungeon deserves something -special-. Link Between Worlds got this right - Lorule Castle's theme is downright epic, every floor being systematically more epic than the previous.

My thought process is since the music added doesn't actually expand the ROM (it's a function inserted to control playback into unused space, and then the game is modified to use it), could we actually -add- Lorule Castles theme to ALTTP provided we don't change the size of the pointer.

For example, lets say the pointer is an unsigned byte (0-255). I would assume things look something like this:

00: No Music
01: No Change
02: Title Theme
...
6F: Ending credits theme

(obviously references here are made up, I haven't actually looked at the data and it's only to serve as an example). At some point, a function is called akin that would essentially be playMusic(02) for the title theme, obviously the ASM equivalent.

The maximum size for an unsigned byte on the SNES is FF, which would mean between 6F and FF are unoccupied. Since I would argue the odds are the music table is not hard coded into the SNES, those should be valid songs to pass to the game, provided there was data actually there to play. Since the MSU-1 hacks all make this data external to the ROM itself, I would think we could -add- new PCM's just by adding new files and changing the data associated with the room to use it. My proposal then would look something like this, again using the above sample table:

6F: Ending Theme
70: Lorule Castle Loop (Variation 1)
71: Lorule Castle Loop (Variation 2)
72: Lorule Castle Loop (Variation 3)
73: Lorule Castle Loop (Variation 4)
74: Lorule Castle Loop (Variation 5)

We change different floors of the final dungeon to use different songs, rather than the standard ones normally available. One would have to look at the floors to see where each set of songs made sense - something like the first two floors having 70, the basement levels having 71, and so on. Ideally you would want to group floors such that falling through a pit wouldn't change your music (though if I'm not mistaken there's one HUGE drop you fall down to the basement; not much you can do about that).

I'm confident this can be done; what I'm mostly curious about is whether I have the right idea, or whether there is something I'm missing to the process. If I can get it working, I'd gladly make the work available.

Hal_Emmerich
Newcomer

Since : 2016-11-21

Back to top Go down

Custom Final Dungeon music for LTTP Empty Re: Custom Final Dungeon music for LTTP

Post by qwertymodo Mon 21 Nov 2016 - 20:17

You totally can, I inserted an additional track in Parallel Worlds, and Conker has ~60 tracks. However, you have to consider how you want to handle the SPC side of things in case the user doesn't use the MSU-1 audio pack.
qwertymodo
qwertymodo

Custom Final Dungeon music for LTTP Image212

Since : 2014-10-21

Back to top Go down

Custom Final Dungeon music for LTTP Empty Re: Custom Final Dungeon music for LTTP

Post by Conn Tue 22 Nov 2016 - 5:18

I hacked around 100 tracks into conker, you can hook the code from the dungeon entrance and save the original spc track # to a free ram to recall it in case track not found. For overworld I used a similar technique, however made a table to select the correct theme.

I'll be of no help however, since as you may notice from all stuff I hacked that I did more for this game than a lifetime can bear. Means, I'm retired.
Conn
Conn

Custom Final Dungeon music for LTTP Image212

Since : 2013-06-30

Back to top Go down

Custom Final Dungeon music for LTTP Empty Re: Custom Final Dungeon music for LTTP

Post by Hal_Emmerich Tue 22 Nov 2016 - 10:41

Hmm..

Hypothetically - could I not add a few new songs using Hyrule Magic, copy the instructions for Dungeon into each, but have the PCM for them be the different Lorule Castle variations, then modify the maps to use the correct song? Does the subroutine modify the code that plays music, or do you actually have to change every map to use the MSU function explicitly?

Hal_Emmerich
Newcomer

Since : 2016-11-21

Back to top Go down

Custom Final Dungeon music for LTTP Empty Re: Custom Final Dungeon music for LTTP

Post by Conn Tue 22 Nov 2016 - 11:41

I once tried to edit spc tracks with HM but you really need to be a music scientist to be able to. If you are interested, look here:
https://www.zeldix.net/t154-the-music-tinkering-thread

You have 3 music banks:
01-0f: overworld
10-1f: dungeon
20-22: credits (not those 6f you told above, though they could be mirrors).

I am unsure what you want to do, if you only want to play different msu (not spc), that's simple. Check when the theme is stored to $012c, hook, check the entrance ($010e) and play whichever theme you like depending on the entrance.
Conn
Conn

Custom Final Dungeon music for LTTP Image212

Since : 2013-06-30

Back to top Go down

Custom Final Dungeon music for LTTP Empty Re: Custom Final Dungeon music for LTTP

Post by qwertymodo Tue 22 Nov 2016 - 13:01

I did it the hard way for Parallel Worlds.  I only needed 3 extra tracks (a different version of each overworld, and one overworld with an intro fanfare), and PW had 2 unused tracks (the Soldiers Alerted track in Kakariko Village and the Death Mountain bunny track), along with track 15 which was never used, so I actually edited the song pointers in the SPC data itself so that those tracks pointed to the original overworld tracks instead, then on the MSU side they play the alternate versions.  It would have been easier to just handle it all in the MSU-1 asm code, but for some reason I just really wanted to do it that way Razz
qwertymodo
qwertymodo

Custom Final Dungeon music for LTTP Image212

Since : 2014-10-21

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum