News:

As a consequence of the forum being updated and repaired, the chatbox has been lost.
However, you can still come say hi on our Discord server!

Main Menu

Changing music

Started by Mion Sonozaki, 18, July, 2011, 02:46:44 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Mion Sonozaki

More of a help request thread if anything, and I apoligize for it, but does anyone have any information in regards to changing the music which plays during whatever points in Golden Sun?

I'm not talking about modifying the music themselves, but rather things like changing the boss theme to Madra's theme, just for the sake of giving a lulzy example.

I really want to restore the GS1 overworld, boss, and battle themes. Thank you!

Daddy Poi's Oily Gorillas

#1
Oh yes, you can change the music of cities like Madra, but you may have to use the HEX Editor, since I do not think Atrius's Editor allows for it yet.

I have only just found how to change the music after some assembly reading. (I placed a breakpoint on the song in the song bank, and read the assembly code until I found where it was coming from.)
Memory Viewer:
080EF14C = (Not sure how this database works, but Golden Sun divides its data too much, so the town probably links to this.) It does look similar to how random battles are done though,  I'll do more testing.
080EF152 = Madra's song.

Hex Editor:
000EF14C and 000EF152.


I have not looked into how the Battles get their music, but I have this strange feeling its all in assembly code. Not sure, though. I am likely to look into it. So I may have more information coming soon. (Unless I happen to change my mind.) EDIT: Just as I suspected. Assembly coded.. Note to self: Exact address for Felix. 080CA63C ; The othres (Jenna/Isaac) should be here too, not sure about the Ship.

080EF0B4 = Overworld (On ship)
080EF0BC = Overworld (With Isaac's Party) (Song at 080EF0C2)
080EF0C4 = Overworld (Without Isaac's Party) (Song at 080EF0CA)

080EF13C; 080EF15C rows.. I am not sure which places these are connected to.. but it has overworld music as well.There's a couple more similar to that further down.

+0 = Number that matches it with the town. (I think FFFF is for end of list.) (This is the Room Number if bit 8*** is on in +2, otherwise, it will use the Group number ("General Specific"))
+2 = Door number (Where you are coming from.) Not sure what that 8*** part is, but it seems to be related to the +0 number, though. (One uses 02000420 (if on), the other uses 0200042C (if off)) Edit again: Off is General Specific.. Meaning, all rooms based on say... Venus Lighthouse? On is Room specific. (I think?) for example .. Daile... The inside and outside rooms would be "General specific"., yet, different rooms.
7FFF/FFFF used when not defining a door specific number.
+4 = Use this music if flag is enabled. (FFFF doesn't check a flag.)
+6 = Song

-So ... how are the rooms grouped together you ask? In another database.. Here's Madra again.

080F1908
+2 = The general index (It's also used for the Title of a map.)
..this database has very little to do with music, so I won't go into detail.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Mion Sonozaki

#2
I'm not at all fluent in VBA's memory user. This is my first time using it. But I understand as much as modifying x00EF152 in translhextion will change Madra's theme. As to actually find these offsets, could you please clarify for someone like me who is less familiar? :S


Offtopic: What are the values for the GS1 themes like Venus Lighthouse and the Overworld? Cannot seem to find em' in Sappy's song list, unless they're over FF, or I missed them?

Daddy Poi's Oily Gorillas

Okay. First time? Then I shall start my newbie tutorial!

1. To get to the Memory Viewer on VBA, click Tools => Memory viewer.

2. Place the offset/address you want to go to in memory in the textbox and press Go. For example, we could put 080EF14C in the textbox, and press Go. Everything in the 08000000 section (ROM section.) can be found in a HEX editor. Do note that the changes in the memory viewer are temporary unril you reset the game. You should edit in a HEX editor when making permanent changes.

080EF14C = This is the start of the database we are looking at.


02D7 = This is Venus Lighthouse outside.
02E7 = This is Venus Lighthouse inside.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Mion Sonozaki

I understood as much as putting 080EF14C into the memory viewer and pressing Go. When you edit in a hex editor, you change the 8 to a 0.

Problem is, how exactly do I find the music I want to modify? That is what is baffling me.

Daddy Poi's Oily Gorillas

Each entry is 8 bytes long. Okay? If you keep note of the song values and replace the song of the room you know to the rooms of the unknown ones, you might get an idea what is related.

Most of this is organized in a certain way. At first glance, it may seem a bit confusing, but certain things have to go before others, so. (From most specific to least specific for each mini-section.)
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Mion Sonozaki

#6
Let me get this straight. Here's the method I'm using:

1. Search up 080EF14C in the memory viewer

2. Find the song value in Sappy

3. Look for that number of the song I want to replace, then trial and error until I find what I'm attempting to replace?


Isn't there a more specific, more practical method?


Another offtopic: Any way to change the music of certain rooms as well? I.e. changing the Human/Venus room of Mars Lighthouse into Gaia Rock's theme?

And restoring the OW's drum track? 1:10 http://www.youtube.com/watch?v=5XryhVMWCdI
I noticed in Sappy certain tracks do not play.

Daddy Poi's Oily Gorillas

#7
A more practical method? I'm not sure about a better way right now.. Unless you can find a similar program like Sappy that displays more than FF? Or wait a few years for Atrius to add music swapping in his editor.

QuoteAnother offtopic: Any way to change the music of certain rooms as well? I.e. changing the Human/Venus room of Mars Lighthouse into Gaia Rock's theme?
Well, you could add another entry... (But it has to be before the one that the room will detect and use.)

The entry would look like this.

ROOM# FFFF FFFF SONG#

ROOM# = As seen in the Warp Debug menu on the left, except you have to convert to hex. This is only ROOM number if second 16-bit is of the 8*** flag.
SONG# = I have not looked up the number for Gaia Rock's theme.


EDIT: The game will check each entry from the first until it finds an entry that matches what it needs.. (Or until it reaches the end of the list, in whichcase there would be no matches.)
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Mion Sonozaki

Quote from: Teawater on 18, July, 2011, 06:57:25 PM
A more practical method? I'm not sure about a better way right now.. Unless you can find a similar program like Sappy that displays more than FF? Or wait a few years for Atrius to add music swapping in his editor.
Hrm. It seems switching memory viewer to 16bit mode works too. However, by practical method, I meant more specifically how to find the map's songs I want to find to change them, as opposed to trial and error of every instance using that song?

Salanewt

Quote080EF14C = This is the start of the database we are looking at.

QuoteROOM# FFFF FFFF SONG#

ROOM# = As seen in the Warp Debug menu on the left, except you have to convert to hex. This is only ROOM number if second 16-bit is of the 8*** flag.

Until/unless support is included in the editor for this, you will probably have to do it through trial and error. My best guess would be that the maps are organized in a similar way to how they are done in the map editor. Luckily, you only really have to check for the room number to figure out what the rooms are - the numbers are the same in the map editor, aside from a conversion between decimal/hex. To define more songs/rooms, you would probably have to relocate the database.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Daddy Poi's Oily Gorillas

#10
Don't forget, the first 16-bit can also be Group number.

Room Number or Group Number.. they both count up together in the order displayed in the Warp Menu and editor.


I have prepared a picture to give a visual on what this is.


Knowing whether the music you are trying to replace is affected by a door or flag might help your chances in trial and error.

Oh yeah, it looks like every entry is in order by room... and group
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Daddy Poi's Oily Gorillas

#11
Want to learn how to change the music of battles?

The big function seems to be here: 080CA5D8... I have been reading it.

There is a database that is for setting specific songs to battles located at 080EFD1C. This does not include Felix/Jenna/Ship/Isaac themes as they are done in the function themselves. (If the music returned is 0000, it will use that.)

Anyway. For that database at 080EFD1C, it has a neat format.

8*** = Set Music
0*** = Battle.

The last entry is 8000 0000, as you can see it is to set music 0000 to battle 0000... (But I think the code just detects the 0000 as the end?; Anyway, it looks like when you use 0000 as the battle, you are actually setting the music to all remaining battles.)

The battle number is done like this (If I read the ASM right.)

0aab, where a is the random battle groups number, and b is the random battle 0-7.


EDIT: Whoops.. fixed a tiny mistake.
Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Sometimes I like to compare apples to oranges. (Figuratively) ... They are both fruits, but which one would you eat more? (If taken literally, I'd probably choose apples.)
Maybe it is over-analyzing, but it doesn't mean the information is useless.


The only GS Discord servers with significance are:
Golden Sun Hacking Community
GS Speedrunning
/r/Golden Sun
GS United Nations
Temple of Kraden

Can you believe how small the Golden Sun Community is?

2+2=5 Don't believe me? Those are rounded decimal numbers. Take that, flat earth theorists! :)

Salanewt

And to change Felix' theme, the song is located at x080CA664 as 2632. 0x32 = Felix' theme, so this is the byte that you change. It seems kind of limited though.
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?

Rolina

Something I want to look into much much later is to see if we can find a way to code music to go from field to battle and back seamlessly, kind of like in kingdom hearts.  I actually really like how they do that.  However, that's not happening any time soon, I'm sure.

Salanewt

So the different songs sort of blend? I would imagine that changing the code to add fading to the songs should work. Song A fades out at the same time as Song B fades in; is that what you meant?
Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?