Rain SFX and Music

Go down

Rain SFX and Music Empty Rain SFX and Music

Post by SunGodPortal Sat 14 Feb 2015 - 20:51

I want my character to hang out with Zelda for a lot longer but there are problems with the rain and music that I would like to address. Does anyone know a way to:

Do what?
1) remove the rain sfx from dungeons but not places like houses, if not possible to do it this way, remove them from ALL indoor areas
2) keep the rain sfx from disappearing occasionally on the overworld (i think it even does this in GoW)
3) remove the "beginning" music from Link's house in the opening, replace with normal "town" music

Why?
1) It seems to change the mixing/balance of the sound channels. I find this annoying. If I can't find a way to fix this I suppose I could just have more things take place below the first floor (that removes the rain sfx, right?)
2) I'd like to experiment with removing all of the overworld music except for the woods (that part is easy) but if the rain sfx keep stopping there is only akward silence. During some of my experiments with the opening scenario the music disappeared. I like the mood this created and it made entering places have a more dramatic effect once the music changed.
3) It doesn't fit the mood of my new opening scenario. Sounds too melodramatic. The town theme fits the more playful mood of my game. I know it changes to the town music as soon as you leave and re-enter but I'd like it to be this way from the start if possible.
SunGodPortal
SunGodPortal

Rain SFX and Music Image213

Since : 2015-01-26

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Puzzledude Mon 16 Feb 2015 - 8:35

1) remove the rain sfx from dungeons but not places like houses, if not possible to do it this way, remove them from ALL indoor areas.
This is hardcoded and would need ASM to get rid of. One possibility is also to change floor definitions, since this sound is programed for the first floor only.

2) keep the rain sfx from disappearing occasionally on the overworld (i think it even does this in GoW).
This is fixable in HM, by putting the background music to "rain". In GoW I basically forgot to do that on some areas. But there are also areas, which for some reason don't react to these settings. As if you were not supposed to visit them in the beginning and the rain sound just doesn't appear. Note: thunder music in hardcoded and can not be removed.


3) remove the "beginning" music from Link's house in the opening, replace with normal "town" music.
This is somewhat difficult and again needs ASM, since when Link wakes up there is a special code, which knows to play beginning. After he exits, all the music can be set with HM, but not before. You can however bring Town music into the bank for beginning music with HM. With this all beginning music will be replaced with town. The overworld beginning music can then be set to World map music for instance.
Puzzledude
Puzzledude

Rain SFX and Music Image213

Since : 2012-06-20

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by SunGodPortal Mon 16 Feb 2015 - 19:37

1) Okay. I think I can live with it as it is. I'll just make my dungeons deep instead of tall. That will make the overworld designs less troublesome anyway.

2) Understood.

3) If i replace the Beginning music with the Town theme using that method will that also overwrite part of the intro music? They appear to start out the same but the intro music moves on instead of looping endlessly. Do you know if that data is reused for both songs? If I could find a way to skip the title screen and intro and just go from the "Nintendo presents" logo to the save menu (like I want) this won't be an issue though.
SunGodPortal
SunGodPortal

Rain SFX and Music Image213

Since : 2015-01-26

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Puzzledude Tue 17 Feb 2015 - 5:01

3) If i replace the Beginning music with the Town theme using that method will that also overwrite part of the intro music? They appear to start out the same but the intro music moves on instead of looping endlessly. Do you know if that data is reused for both songs? If I could find a way to skip the title screen and intro and just go from the "Nintendo presents" logo to the save menu (like I want) this won't be an issue though.
The Intro music is separated from the Beginning music. And both are also separated from the music, played during the Title screen (title music). But I believe the Beginning music is also played during the story scenes, after the title screen.
Puzzledude
Puzzledude

Rain SFX and Music Image213

Since : 2012-06-20

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Conn Tue 17 Feb 2015 - 5:31

1) remove the rain sfx from dungeons but not places like houses, if not possible to do it this way, remove them from ALL indoor areas

well the rain sfx is quite Special as it is stored to $012d which is normally unused
012c: spc
012e: Sound effects 1
012f: Sound effects 2

disable inside hyrule Castle rain sfx:
pc 01/03ae: 03 -> 80
disable Music fade out rain sfx (intermediate during overworld and entering Hyrule Castle:
pc 01/0395: 05 -> 80 and
pc 01/0221: 05 ->80

This will also disable rain at the beginning in Link's house.

2) keep the rain sfx from disappearing occasionally on the overworld (i think it even does this in GoW)
If this is doable in HM, as Puzz pointed out, go for this Option Smile


3) remove the "beginning" music from Link's house in the opening, replace with normal "town" music
pc 02/DEA6: 03 -> 07


Last edited by Conn on Tue 17 Feb 2015 - 9:20; edited 1 time in total
Conn
Conn

Rain SFX and Music Image212

Since : 2013-06-30

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by SunGodPortal Tue 17 Feb 2015 - 5:53

Cool thanks. I'll try this out later. One issue though. I never learned how to read stuff in the form of "pc 02/DEA6". That's like an offset, right? I'm used to stuff like DD31C, EB0B, etc. Is that just a different way to write the same type of information? If so, how do I read it? Sorry, I know... LOL
SunGodPortal
SunGodPortal

Rain SFX and Music Image213

Since : 2015-01-26

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Puzzledude Tue 17 Feb 2015 - 6:48

02/DEA6 is the same as 2DEA6, but the coder will always write it as 02/DEA6, which basically means the third 8000 bank (since the rom is made out of 8000 hex banks, starting with 00) and the "local" ofset is then DEA6. And the PC infront suggests the Hex ofset, since while you are tracing, you actually see the SNES addresses, rather than PC/hex ones.
Puzzledude
Puzzledude

Rain SFX and Music Image213

Since : 2012-06-20

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Conn Tue 17 Feb 2015 - 6:58

I assmue you have a hex Editor in which you open your rom?
I hope this helps:

Rain SFX and Music Image410
Conn
Conn

Rain SFX and Music Image212

Since : 2013-06-30

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by SunGodPortal Tue 17 Feb 2015 - 7:12

I think I get it now, but is "disable inside hyrule Castle rain sfx:
pc 01/03ad: 03 -> 80" one byte off? At that location I have A9, but 03 is the one after it. All the others listed seemed to match up though.
SunGodPortal
SunGodPortal

Rain SFX and Music Image213

Since : 2015-01-26

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Puzzledude Tue 17 Feb 2015 - 7:15

SunGodPortal wrote:I think I get it now, but is "disable inside hyrule Castle rain sfx:
pc 01/03ad: 03 -> 80" one byte off? At that location I have A9, but 03 is the one after it. All the others listed seemed to match up though.
Has to be by logic, since A9 is Load accumulator. Sometimes the address is pointed to the actual LDA, sometimes one byte after. But you certainly must Not change A9.
Puzzledude
Puzzledude

Rain SFX and Music Image213

Since : 2012-06-20

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by SunGodPortal Tue 17 Feb 2015 - 7:26

"Sometimes the address is pointed to the actual LDA, sometimes one byte after."

In cases where the original byte is not provided for me (in this case it was 03), how will I know the difference if it is sometimes one byte after? Or will I not know until something awful happens? LOL

Note: I have no idea what a load accumulator or LDA is. I'm learning pretty much everything as I go. My area of expertise up til now has always been music, not of stuff like this. It's getting interesting though.
SunGodPortal
SunGodPortal

Rain SFX and Music Image213

Since : 2015-01-26

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Conn Tue 17 Feb 2015 - 9:20

Yes, sorry, it is pc 01/03ae: 03 -> 80

Assembly is opcodes with a address or Byte, so in this case you have
$02/83AD A9 80       LDA #$80              
$02/83AF 8D 2D 01    STA $012D

snes lorom address $02/83AD is calculated (lunar address) to 01/03ad (the address I gave you.
In A9 80       LDA #$80
A9 is the opcode which is interprated by the Assembler to LDA (Load), the second is the Byte where you changed #$03 to #$80. 03 is rain, 80 is mute. That's what you did when changing 01/03ae to 03->80.

In the second code
8D 2D 01    STA $012D
8d is the opcode for STA (store) and 2d 01 the address. Snes assembly reverses the Byte read so 2d 01 is actually address $012d, which as I posted above is the Music address for rain.

This was a small Crash course but I hope everything works now, I also corrected the address to 01/03ae in above post
Conn
Conn

Rain SFX and Music Image212

Since : 2013-06-30

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by SunGodPortal Tue 17 Feb 2015 - 22:17

Change music in Link's house in opening scene: worked perfectly.
Disable rain SFX indoors: worked perfectly

Disable change to sound levels when rain SFX and music are together: It worked, but there were a few issues. Either way, when I asked about this I was mainly concerned about it while indoors. So with the above "disable rain SFX indoors" working properly I'm not worried about it anymore. I'll leave this aspect the way the game originally had it.

Change overworld music to "none" in HM: It worked just fine and was easy, but any time you exit a place in the "beginning" phase of the game it still plays the "beginning" music even if you have the overworld music in that area set to "none". After exiting I could walk one screen over and the music would stop but if I went indoors and went back out again the song would start again.

As for the assembly and SNES addresses bit, it made more sense to me than when I had ever read about it before so, good job. Smile As I mentioned, I don't know anything about this stuff. Nearly all of it is new to me. I've never had any classes related to programming or anything so what I'm learning is just what I can find on the internet. So far editing stuff in hex has been a lot of fun. For example, when I start with a fresh ROM and want to place my Pinky character into it I find it much simpler to just go to DD31C, DD33A and DD358 and input 9F 31 5F 4A to fix my palette rather than doing it in Hyrule Magic.
SunGodPortal
SunGodPortal

Rain SFX and Music Image213

Since : 2015-01-26

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Conn Wed 18 Feb 2015 - 4:38

If you like to help yourself with These asm related stuff you could try to go through my hacking tutorial:
https://www.zeldix.net/t134-coding-for-absolute-beginners

what you Need is geiger snes9x Debugger and lunar address - note that this hacking tutorial is made for hirom(bszelda) and alttp is lorom, so you Need to recalculate the snes addresses to pc addresses with lunar address.

Music is stored to $012c (#$03 is beginning Music, #$07 is village Music and so on).
Be sure to have the hook "trace once" otherwise you get hundrets of MB data. Search in the log for sta $012c after entering the overworld and where #$03 (not fade out #$F1 is stored:
Code:

$00/F40C AD 32 01    LDA $0132  [$00:0132]   A:FF01 X:002C Y:00FF P:envMXdizc
$00/F40F C9 FF       CMP #$FF                A:FF03 X:002C Y:00FF P:envMXdizc
$00/F411 F0 03       BEQ $03    [$F416]      A:FF03 X:002C Y:00FF P:envMXdizc
$00/F413 8D 2C 01    STA $012C  [$00:012C]   A:FF03 X:002C Y:00FF P:envMXdizc
here you see that your value 03 Comes from $0132 (it's in the Accumulator then A:FF03)
So search next further above where it goes to "$0132":

This is already a bit more advanced as the X-Register is involved (ldA -> load into Accumulator A, ldX -> load to X-Register, ldY->load to Y-Register, the same is stA, stX, stY):
Code:

$02/8465 A2 03       LDX #$03                A:2400 X:0002 Y:005A P:eNvMXdizc
$02/8467 AF CA F3 7E LDA $7EF3CA[$7E:F3CA]   A:2400 X:0003 Y:005A P:envMXdizc
$02/846B F0 1E       BEQ $1E    [$848B]      A:2400 X:0003 Y:005A P:envMXdiZc
$02/848B 8E 32 01    STX $0132  [$00:0132]   A:2400 X:0003 Y:005A P:envMXdiZc
you see that X Register gets X:0003 and then stx to $0132?
This is your address where the beginning Music is set:
$02/8465 A2 03       LDX #$03
Now calculate the snes address 02/8465 to pc using lunar address with lorom switched on and you get the pc address 01/0465. In your hex Editor you find A2 03 here. If you Change it to A2 07 you will hear kakariko Music after leaving links house at the beginning or A2 02 the regular overworld Music...
You Need to Keep on tracing for further Screens (e.g., I noticed that when going a Screen up again the beginning Music Plays, but reading your post, this one was adjustable in HM even, so 01/0465: a2 03 -> a2 02 is probably all you Need to set).
Conn
Conn

Rain SFX and Music Image212

Since : 2013-06-30

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by SunGodPortal Wed 18 Feb 2015 - 4:54

Okay. Cool. Does one of the docs on this site tell what song each of those values will set it to? I've looked at a number of them but the sheer volume of documentation here can sometimes be a bit overwhelming.

I'll def read that tutorial. The more skills I can accumulate during this project the better off I'll be and the better my hack will likely be in the end.
SunGodPortal
SunGodPortal

Rain SFX and Music Image213

Since : 2015-01-26

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Puzzledude Wed 18 Feb 2015 - 6:05

Change overworld music to "none" in HM: It worked just fine and was easy, but any time you exit a place in the "beginning" phase of the game it still plays the "beginning" music even if you have the overworld music in that area set to "none".
That's because the overworld music can be set in HM only when you walk into this area by another area. Exiting the caves will always result in playing beginning if you are in the beginning faze and will always play World Map if in the other parts (1st part= pendant collecting, 2nd part= crystal collecting) of the game. Exception are 2 entrances in the forest and 1 in village (special coding by original authors to achieve that).

But Conn made a music ASM to be able to give any music to any area, including exiting of the caves. Should be in the small hacks area.
Puzzledude
Puzzledude

Rain SFX and Music Image213

Since : 2012-06-20

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by SunGodPortal Wed 18 Feb 2015 - 6:26

You know, it's funny. When I originally decided to do a more original hack than my initial "play as Zelda" idea my intention was to create a simple hack, but one that was more complex than a "Master Quest" type. I just didn't want something that was going to take forever, not out of laziness but because there are so few completed hacks of this game. A game I truly love (as corny as that may sound). But the further I get into it, the more I have to learn and the more I learn, the more I want to do with it. LOL Part of me keeps saying "keep it simple" but I can't help but want to do more and more with this.
SunGodPortal
SunGodPortal

Rain SFX and Music Image213

Since : 2015-01-26

Back to top Go down

Rain SFX and Music Empty Re: Rain SFX and Music

Post by Conn Wed 18 Feb 2015 - 6:54

Okay. Cool. Does one of the docs on this site tell what song each of those values will set it to?

You know there are 3 Music Banks, overworld, dungeon and ending. You cannot mix These (like playing dungeon Songs on the overworld). Only native exception is Link's house where overworld bank is loaded. However there's no asm yet to custom load e.g., dungeon bank on overworld.


Here's your requested list:

Code:

Theme list (both hex and dec in clamps)
Overworld:
-01 (01)Triforce + title screen
-02 (02)Overworld
-03 (03)Rain
-04 (04)Rabbit
-05 (05)Lost Woods
-06 (06)Introduction
-07 (07)Kakariko Village
-08 (08)Portal SFX
-09 (09)Dark World
-0A (10)Master Sword
-0B (11)Name select screen
-0C (12)Guard summoned
-0D (13)Skull Woods
-0E (14)Minigame
-0F (15)Title screen only

Indoors:
-10 (16)Hyrule Castle
-11 (17)Light World dungeon
-12 (18)Cave
-13 (19)Medallion/crystal acquired
-14 (20)Sanctuary
-15 (21)Boss
-16 (22)Dark World dungeon
-17 (23)Fortune Teller
-18 (24)Cave (appears to be identical to -12)
-19 (25)Zelda rescued in prison
-1A (26)Sage rescued in crystal
-1B (27)Fairy spring
-1C (28)Ganon's theme only
-1D (29)Ganon appears in Agahnim's shadow
-1E (30)Face-to-face + Ganon's theme
-1F (31)Ganon battle

+ 3 ending themes
20(32), 21(33),22(34)

in asm you of course need the hex values. You see that I changed 03->07 to play kakariko instead of rain.
Conn
Conn

Rain SFX and Music Image212

Since : 2013-06-30

Back to top Go down

Back to top

- Similar topics

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