Several questions

Go down

Several questions Empty Several questions

Post by Jared_Brian_ on Mon 30 Sep 2019 - 1:10

Ok so question number one, is there a way to make it so when you beat Agahnim for the first time and he throws you into the dark would to make the game transition into phase 1 instead of 2? so that the priest in the sanctuary will still be there the enemies wont be as hard etc. i though that i could maybe make the game go into 2 then 1 and then 2 again by beating Agahnim and then going to the sanctuary and talking to the priest with Zelda but the priest doesn't appear in phase 2.

second question is that i found out that in order to move the mantle in the castle to get to the sewers you not only have to have Zelda with you but you also have to have the lamp otherwise you cant push it over. so my question is, is there a way to change what item is needed to move it (more specifically the bug net) or if not to make it so you only need Zelda with you?

3rd how does one consistently add and remove functioning doors in the dungeon editor, is there a certain limit per room of how many doors that you can have that perform a special function? such as opening upon hitting a switch or killing enemies? because ive set up several different rooms with such triggers and only one works now and no matter what type of door i change the others to or on what layer i add them on they will always bug out, either appear open when the are supposed to be close, not block the player from walking on top of them, etc.

4th i'm having some problems getting Agahnim to load properly, i found that i layout a dungeon in such a way that i never go up or down stairs that he'll load (not with the right palette but a least loaded) but if i add stairs in the dungeon in order to get to him, the Agahnim talk nor the actual boss Agahnim will load at all and only a shadow of the unconscious Zelda will appear on the altar and nothing more. so are there some type of requirements to get him to load? seeing as in normal alttp you have to climb at least 5 sets of stairs to get to him.

5th is there some other dungeon editor that is compatible with hyrule magic? because id rather not have to do every aspect of the overworlds in HM and then have to switch to a different editor and then not be able to change anything.


i know this is quite a lot but any help you can give will be highly appreciated -Jared_Brian_

Jared_Brian_
Hardhat Beetle
Hardhat Beetle

Since : 2019-05-06

Back to top Go down

Several questions Empty Re: Several questions

Post by Puzzledude on Mon 30 Sep 2019 - 12:55

Ok so question number one, is there a way to make it so when you beat Agahnim for the first time and he throws you into the dark would to make the game transition into phase 1 instead of 2? so that the priest in the sanctuary will still be there the enemies wont be as hard etc. i though that i could maybe make the game go into 2 then 1 and then 2 again by beating Agahnim and then going to the sanctuary and talking to the priest with Zelda but the priest doesn't appear in phase 2.
Well this is obviously not recommended, since after beating Agahnim, the game will be in the final "mode", ie part2. Sure this can be changed to part1, but not recomended, since if you make: defeat Agahnim, then go to part1; there is no way to then actually bring the game to part2 (ie collecting crystals).

second question is that i found out that in order to move the mantle in the castle to get to the sewers you not only have to have Zelda with you but you also have to have the lamp otherwise you cant push it over. so my question is, is there a way to change what item is needed to move it (more specifically the bug net) or if not to make it so you only need Zelda with you?
This should be easy with hex editing, since the game probably just checks the RAM for Lamp in the code, so simply change to RAM for the bug-net or what ever item, but note: I never looked into this nor traced the Mantle code, so no idea where it's at.

3rd how does one consistently add and remove functioning doors in the dungeon editor, is there a certain limit per room of how many doors that you can have that perform a special function? such as opening upon hitting a switch or killing enemies? because ive set up several different rooms with such triggers and only one works now and no matter what type of door i change the others to or on what layer i add them on they will always bug out, either appear open when the are supposed to be close, not block the player from walking on top of them, etc.
Yes, there's not only a limit per room, but a sequence problem. You are limited to 4 "special" doors for one HM room. Special doors are: with small/big key lock, with any shutter, bombable etc. Basically anything connected with RAM or effects (like open when all defeated or open with switch or open with torches lit). You need to insert these doors first when inserting on BG3. Regular doors must be inserted later, so they will be last in the hex code. If you insert door type 0 first, then special doors might not work. 4 lockable/bombable doors per room is limit for RAM, then nothing will work later. For instance 4 locked doors+ shutter door + normal (makes shutter invalid) etc. 5 locked doors, makes one locked door invalid etc.

You also need an exact door type for effects to work. For instance: insert shutter type 23 might not work since for instance shutter 24 is correct if effect defeat all for open is chosen. You basically need to use the original game to see what to use where. Sometimes if door is inserted on connection between 2 rooms, you need to insert the corresponding door in the room2 for the door in room1 to work. Etc. This is not so easy obviously.


4th i'm having some problems getting Agahnim to load properly, i found that i layout a dungeon in such a way that i never go up or down stairs that he'll load (not with the right palette but a least loaded) but if i add stairs in the dungeon in order to get to him, the Agahnim talk nor the actual boss Agahnim will load at all and only a shadow of the unconscious Zelda will appear on the altar and nothing more. so are there some type of requirements to get him to load? seeing as in normal alttp you have to climb at least 5 sets of stairs to get to him.
Sets of stairs is irrelevant. Agahnim is problematic, since he'll only load properly in the original room where's he's at in the original game. Move him to another room and he'll not load correctly, nor the Zelda sequence. The staircase was used in original to correctly reload the indoor blockset and the sprites blockset, so recomended to use staircase before him.


5th is there some other dungeon editor that is compatible with hyrule magic? because id rather not have to do every aspect of the overworlds in HM and then have to switch to a different editor and then not be able to change anything.
Recomended is to only use one editor for one hack, but on multiple Roms. You can use Zarby's editor for testing on compatibility, but using 2 editor on one hack will probably just bug it even more.
Puzzledude
Puzzledude

Several questions Image213

Since : 2012-06-20

Back to top Go down

Several questions Empty Re: Several questions

Post by Jared_Brian_ on Mon 30 Sep 2019 - 16:27

PuzzleDude wrote:Well this is obviously not recommended, since after beating Agahnim, the game will be in the final "mode", ie part2. Sure this can be changed to part1, but not recomended, since if you make: defeat Agahnim, then go to part1; there is no way to then actually bring the game to part2 (ie collecting crystals).
well the idea with this was to then make something else trigger the phase 2 like the second agahnim or maybe coming out of the lost woods with the master sword.

PuzzleDude wrote:Yes, there's not only a limit per room, but a sequence problem. You are limited to 4 "special" doors for one HM room. Special doors are: with small/big key lock, with any shutter, bombable etc. Basically anything connected with RAM or effects (like open when all defeated or open with switch or open with torches lit). You need to insert these doors first when inserting on BG3. Regular doors must be inserted later, so they will be last in the hex code. If you insert door type 0 first, then special doors might not work. 4 lockable/bombable doors per room is limit for RAM, then nothing will work later. For instance 4 locked doors+ shutter door + normal (makes shutter invalid) etc. 5 locked doors, makes one locked door invalid etc.

ahh so thats what i was missing, i thought there was a limit but i didnt know you had to add the 0 doors after the others.

PuzzleDude wrote:Sets of stairs is irrelevant. Agahnim is problematic, since he'll only load properly in the original room where's he's at in the original game. Move him to another room and he'll not load correctly, nor the Zelda sequence. The staircase was used in original to correctly reload the indoor blockset and the sprites blockset, so recomended to use staircase before him.

now i was trying to use the same room as he's originally in and actually hadnt changed aything in that room except for the staircase value leading into room 48 where the altar is and the room just before it so instead of the stair case coming from room 64 it came from room 65 and just changing that caused him to not load. but if i just shove in some connecting doors between room 65 to 64 and then to 48 agahnim will load and even if i dont do it from the upper left corner of room 64 like it is by default and i go from room 65 to 49 and then over to 48 he still loads.

PuzzleDude wrote:Recomended is to only use one editor for one hack, but on multiple Roms. You can use Zarby's editor for testing on compatibility, but using 2 editor on one hack will probably just bug it even more.

rats well worth a shot. ive tried zarby's editor a little bit but running the overworld editor through wine on linux is unusabley slow.

Jared_Brian_
Hardhat Beetle
Hardhat Beetle

Since : 2019-05-06

Back to top Go down

Several questions Empty Re: Several questions

Post by Jared_Brian_ on Tue 1 Oct 2019 - 2:15

another possibility: is there some way to make it so the player is teleported into the dark world after defeating a different boss (or by entering a room etc.)? or is that a agahnim specific trait or maybe a room 32 specific trait?

also i have since discovered that if you use stairs going from the upper left corner in room 64 to 48 agahnim will load just fine so i guess tha'ts a requirement.

also another question:
can i make it so that the lost woods fog appears over area 18 (kakariko village) instead of area 00?

Jared_Brian_
Hardhat Beetle
Hardhat Beetle

Since : 2019-05-06

Back to top Go down

Several questions Empty Re: Several questions

Post by Puzzledude on Tue 1 Oct 2019 - 14:45

another possibility: is there some way to make it so the player is teleported into the dark world after defeating a different boss (or by entering a room etc.)? or is that a agahnim specific trait or maybe a room 32 specific trait?
Must be in room 32, since there is a special exit that loads this value and an ASM code which loads this value. You would need to read the code and change the value to new room, and additional ASM for this to start at a new boss.

also i have since discovered that if you use stairs going from the upper left corner in room 64 to 48 agahnim will load just fine so i guess tha'ts a requirement.
I never tested Agahnim outside of his original position, and I used one staircase just before his room.

also another question:
can i make it so that the lost woods fog appears over area 18 (kakariko village) instead of area 00?
Yes, but very difficult, since you would need ASM to load fog here and on which condition (always or after event) and (which is problematic) you would need to make additional ASM for transits from all areas into/out of the village to be "fade-out" as the forest has it, and that basically needs a coder with similar skill as Euclid.
Puzzledude
Puzzledude

Several questions Image213

Since : 2012-06-20

Back to top Go down

Several questions Empty Re: Several questions

Post by Jared_Brian_ on Tue 1 Oct 2019 - 15:03

PuzzleDude wrote:Must be in room 32, since there is a special exit that loads this value and an ASM code which loads this value. You would need to read the code and change the value to new room, and additional ASM for this to start at a new boss.

ok so i actually started digging into the code using the Banks_02_47_2014 disassembly code and upon digging into the sprite code for agahnim i found that upon his death a function is called named PrepDungeonExit that checks to see which boss it was that you defeated and then does different stuff accordingly for example if it is gannon you arnt teleported out of the dungeon if it is agahnim 2 the red flashing backround stops etc. and also has sets the value of the part when you defeat agahnim 1 so at $796E and $796F are A9 03 respectively and you can change that 03 to the part you want 02 being part 1

i was seriously surprised with myself when i actually managed to find this info Very Happy of course all credit goes to whoever made the disassembly code

PuzzleDude wrote:Yes, but very difficult, since you would need ASM to load fog here and on which condition (always or after event) and (which is problematic) you would need to make additional ASM for transits from all areas into/out of the village to be "fade-out" as the forest has it, and that basically needs a coder with similar skill as Euclid.

oh well i wont worry about that now, its not necessary to the overall game play i suppose, is there some easy way to at least just disable the fog that appears over area 00?

Jared_Brian_
Hardhat Beetle
Hardhat Beetle

Since : 2019-05-06

Back to top Go down

Several questions Empty Re: Several questions

Post by Jared_Brian_ on Wed 2 Oct 2019 - 1:07

PuzzleDude wrote:This should be easy with hex editing, since the game probably just checks the RAM for Lamp in the code, so simply change to RAM for the bug-net or what ever item, but note: I never looked into this nor traced the Mantle code, so no idea where it's at.

i found it, at $#D7C55-$#D7C56 youll find AF 4A and you can change the 4A to the item you want, the bug net is 4D

Jared_Brian_
Hardhat Beetle
Hardhat Beetle

Since : 2019-05-06

Back to top Go down

Several questions Empty Re: Several questions

Post by Puzzledude on Wed 2 Oct 2019 - 15:10

oh well i wont worry about that now, its not necessary to the overall game play i suppose, is there some easy way to at least just disable the fog that appears over area 00?
I never had luck with disabling overlays actually. I solved this in a different way, by manipulating the area layout (not recomended though), so I used areas 02, 04, 06 and thus get rid of the annoying 03, 05 with complex backdrops. 00 should be easier, but note: there is also the "tree-shadows" overlay in forest, so ...


i found it, at $#D7C55-$#D7C56 youll find AF 4A and you can change the 4A to the item you want, the bug net is 4D
Yes
Puzzledude
Puzzledude

Several questions Image213

Since : 2012-06-20

Back to top Go down

Several questions Empty Re: Several questions

Post by Jared_Brian_ on Thu 3 Oct 2019 - 3:21

alright so further update on one of the previous questions, if i have the staircase in the same spot as it is to lead to agahnim everything loads fine. but if i have go on another staircase not only agahnim not load but no other sprite will load either. however if i go back up the stairs into the previous level even if i go down multiple layers and then go back up the sprites will be there. for example i have a set of stairs that go down from 65 to 50 on one half and then another in 50 that go back to 65 on the other half. so if i go down the 2 sets down to room 50 again the sprites in both halfs wont be there but if i go back up the sprites will be in the two halves. anyone know what is going on here? am i loading link into an incorrect layer when he goes down the stairs? i have the stair plane settings in both rooms set to 0 and have messed around with the values but to no effect. or maybe is it that i can only place stairs in places where they are in the default game?

Jared_Brian_
Hardhat Beetle
Hardhat Beetle

Since : 2019-05-06

Back to top Go down

Several questions Empty Re: Several questions

Post by Puzzledude on Thu 3 Oct 2019 - 15:14

or maybe is it that i can only place stairs in places where they are in the default game?
No idea, what you are doing wrong, but essentioally with romhacking you can edit the game to such degree, that it will actually feel like a brand new game (with same engine limitations), so obviously you can place staircases anywhere, and the sprites should load. Not loading is an ASM fault, global grid breach of either left or right column room, false BG load, false room id - ie false room load since sometimes when you jump down the indoor ledge the glitch of the code of the original game loads a false room id, which results in major glitches on room transit and renders the game unplayable and so on. Sometimes the sprites don't load for no reason, ie ASM loading routine got bugged, simply from multi-editing of the rom with HM etc.
Puzzledude
Puzzledude

Several questions Image213

Since : 2012-06-20

Back to top Go down

Several questions Empty Re: Several questions

Post by Jared_Brian_ on Fri 4 Oct 2019 - 2:34

PuzzleDude wrote:No idea, what you are doing wrong, but essentioally with romhacking you can edit the game to such degree, that it will actually feel like a brand new game (with same engine limitations), so obviously you can place staircases anywhere, and the sprites should load. Not loading is an ASM fault, global grid breach of either left or right column room, false BG load, false room id - ie false room load since sometimes when you jump down the indoor ledge the glitch of the code of the original game loads a false room id, which results in major glitches on room transit and renders the game unplayable and so on. Sometimes the sprites don't load for no reason, ie ASM loading routine got bugged, simply from multi-editing of the rom with HM etc.

could it have to do something with the headers? i used HM to move the room headers to $10100 because I wasn't able to edit them at all due to what i assumed was a lack of space even though i hadn't really done anything in the dungeons up till that point except change around link's house.
also another update, all of the existing staircases work just fine, i tested it in the tower of hera and couple other dungeons and their sprites all load just fine, so maybe its just the new headers that ive made by changing the values around that don't work right.

PuzzleDude wrote:Sometimes the sprites don't load for no reason, ie ASM loading routine got bugged, simply from multi-editing of the rom with HM etc.

and so if that is the case is, i know i can copy just about all of the overworld tiles from one rom to another with HM but is there a way to copy over rooms to another rom? so i can start editing again from a cleaner slate?

also how hard is it to change the ASM code? like an example if i wanted to make the mantle require you to have another object to push it say, the moon pear which would be this line of code:
code:
LDA $7EF359 : BEQ .return
and is about 6 bytes, could i just add it in there after the previous line of code which checks for the lantern and remove some bytes at the end of the rom so it would be the same size or would i have to change all of the JMP values or something else along those lines as well?
 
also seriously puzzledude even though it seems you only get on once a day, thank you so much for helping me out even though i know you've said here on this forum that you're "retired" from rom hacking.

Jared_Brian_
Hardhat Beetle
Hardhat Beetle

Since : 2019-05-06

Back to top Go down

Several questions Empty Re: Several questions

Post by Puzzledude on Fri 4 Oct 2019 - 15:01

also seriously puzzledude even though it seems you only get on once a day, thank you so much for helping me out even though i know you've said here on this forum that you're "retired" from rom hacking.
Well actually I changed my mind a while back only to finish 2 major projects: Parallel Legacy (Parallel Worlds with remodeled dungeons from Hylian Legacy and/or brand new dungeons), as well as Gates of Time. Then retirement for sure, which of course means I might still manage my Discord and answer questions, I just won't make any more hacks.
Puzzledude
Puzzledude

Several questions Image213

Since : 2012-06-20

Back to top Go down

Several questions Empty Re: Several questions

Post by SePH on Fri 4 Oct 2019 - 18:39

XaserLE made a customizeable asm patch which allows us to add or remove overlays in areas. I never made it worked on my heavily modified conker hack due that my hack used two layers on overworlds, but itll surely work on other hacks without issues. Wont have acess to my computer for at least another week through so cant share the files yet... but maybe he posted that method somewhere in zeldix.
SePH
SePH

Several questions Image212

Since : 2012-06-19

Back to top Go down

Several questions Empty Re: Several questions

Post by Jared_Brian_ on Sat 5 Oct 2019 - 1:48

PuzzleDude wrote:Well actually I changed my mind a while back only to finish 2 major projects: Parallel Legacy (Parallel Worlds with remodeled dungeons from Hylian Legacy and/or brand new dungeons), as well as Gates of Time. Then retirement for sure, which of course means I might still manage my Discord and answer questions, I just won't make any more hacks.
oh thats awesome! ill be looking forward to those

Seph wrote:XaserLE made a customizeable asm patch which allows us to add or remove overlays in areas. I never made it worked on my heavily modified conker hack due that my hack used two layers on overworlds, but itll surely work on other hacks without issues. Wont have acess to my computer for at least another week through so cant share the files yet... but maybe he posted that method somewhere in zeldix.
if he did i couldn't find it.. that would be great if you could post them when you can.

Jared_Brian_
Hardhat Beetle
Hardhat Beetle

Since : 2019-05-06

Back to top Go down

Several questions Empty Re: Several questions

Post by SePH on Tue 8 Oct 2019 - 0:04

Alright, heres XaserLE overlay asm patch.

Code:
;this is for getting the overlays work in certain areas, i use bank 0x3F for the whole code
;WRITTEN: by XaserLE
;THANKS TO: -MathOnNapkins
; -an unknown author of a rain activation code that helped a little
;TODO:
; -missing: silent rain sound in dungeons. for that we need to save a rain indicator in free ram and hook into the dungeon load routine
; -rain doesn't work with overworld warping (teleporter/mirror)

;header
lorom

;THIS IS FOR KEEPING AN OVERLAY APPEARED WHEN GOING FROM ONE AREA TO ANOTHER WITHOUT THE BLANK OUT
ORG $02AC18 ; go to the code that makes sure the overlay keeps appeared in transition from overworld area to overworld area
BRA $00 ; overwrites an "BCS $03" that won't keep the overlay appeared if we are not in the beginning mode
 ; only at the beginning an overlay keeps appeared when going from on area to another without a blank out

;THIS IS THE OVERLAY-CODE
 ; IMPORTANT: If the overlay is drawn correctly depends on the GFX# in this area (look at hyrule magic).
 ;     Rain seems to work various GFX#'s, but clouds for example on 33, 47 and maybe more.

ORG $02AFA3 ; go to beginning of the overlay code (command 293F00)

JSL $3F9180 ; overwrite this with a long jump to expanded space
BRA $62 ; after long jump we return and branch after the piece of code that loads the rain overlay (command A29F00)

ORG $3F9180 ; go to expanded space

LDA $7EF3C5     ; load game state
AND #$00FF      ;
CMP #$0002      ; test for beginning
BCS $04    ; if not beginning, jump to next test
LDX #$009F      ;
RTL ;

LDA $8A         ; load actual area

CMP #$0000 ;
BNE $04 ;
LDX #$009F      ;
RTL ;

CMP #$0002 ;
BNE $04 ;
LDX #$009E      ;
RTL ;

LDA $8A         ; load actual area again

;for paste©
;CMP #$0003 ;
;BNE $04 ;
;LDX #$0095      ;
;RTL ;

CMP #$0003 ;
BNE $04 ;
LDX #$0095      ;
RTL ;

CMP #$0005 ;
BNE $04 ;
LDX #$0095      ;
RTL ;

CMP #$0007 ;
BNE $04 ;
LDX #$0095      ;
RTL ;

CMP #$000A ;
BNE $04 ;
LDX #$009D      ;
RTL ;

CMP #$0040 ;
BNE $04 ;
LDX #$009D      ;
RTL ;

CMP #$0043 ;
BNE $04 ;
LDX #$009C      ;
RTL ;

CMP #$0045 ;
BNE $04 ;
LDX #$009C      ;
RTL ;

CMP #$0047 ;
BNE $04 ;
LDX #$009C      ;
RTL ;

;dark world evil swamp, so test for evil-swamp-dungeon-is-opened is needed
CMP #$0070 ;
BNE $0D ;
LDA $7EF2F0     ; test if evil swamp dungeon already opened
AND #$0020      ;
BNE $03        ; if yes, don't load the rain overlay
LDX #$009F      ;
RTL ;

LDA $8A         ; load actual area again

CMP #$005B ;
BNE $04 ;
LDX #$0096      ;
RTL ;

;no match
RTL ;

;Between the above and the next code there should be enough space to test every area or to test for self-defined events
;in some areas. If you still need more, you need to move it more forward.

;THIS IS THE BLANK-OUT-CODE

ORG $02AADB ; go to beginning of the overlay code (command 293F)

JSL $3F9700 ; overwrite this with a long jump to expanded space
CMP #$01 ; in the new routine i will set the accumulator to 0x01 to indicate that we used the blank out, otherwise 0x00
BEQ $02 ; so if we want to use the blank out, branch to this routine in the original code
BRA $0F ; we don't want to use the blank out, jump to the routine after the RTS in the original code

ORG $3F9700 ; go to expanded space
 ; IMPORTANT: accumulator holds the area that we come from, NOT the actual, the game did this
 ; if want a blank out in an area, you need this when going in AND out

;test where we COME FROM

;for paste©
;CMP #$40 ;
;BNE $03 ;
;LDA #$01 ;
;RTL

CMP #$00 ; test if we come from this area
BNE $03 ; if not, jump to next area
LDA #$01 ; set blank out indicator
RTL

CMP #$02 ; test if we come from this area
BNE $03 ; if not, jump to next area
LDA #$01 ; set blank out indicator
RTL

CMP #$0A ; test if we go in this area
BNE $03 ; if not, jump to next area
LDA #$01 ; set blank out indicator
RTL

CMP #$40 ;
BNE $03 ;
LDA #$01 ;
RTL

;test where we GO TO
LDA $8A         ; load ACTUAL area

;for paste©
;CMP #$40 ;
;BNE $03 ;
;LDA #$01 ;
;RTL

CMP #$00 ; test if we come from this area
BNE $03 ; if not, jump to next area
LDA #$01 ; set blank out indicator
RTL

CMP #$02 ; test if we come from this area
BNE $03 ; if not, jump to next area
LDA #$01 ; set blank out indicator
RTL

CMP #$0A ; test if we go in this area
BNE $03 ; if not, jump to next area
LDA #$01 ; set blank out indicator
RTL

CMP #$40 ;
BNE $03 ;
LDA #$01 ;
RTL

;no match
LDA #$00 ; unset blank out indicator
RTL

;Between the above and the next code there should be enough space to test every area or to test for self-defined events
;in some areas. If you still need more, you need to move it more forward.

;THIS IS THE RAIN-ANIMATION-CODE

;-----------------------------------------------------------------------------------------------------------
;first of all a little helper: if you don't want this flash lights during the rain, uncomment the next lines
;ORG $02A4E7
;BEQ $14
;ORG $02A4F7
;BEQ $04
;ORG $02A506
;BRA $02
;if want to set back to normal, here is the original code, uncomment it and out-comment the modified above
;ORG $02A4E7
;BEQ $1D
;ORG $02A4F7
;BEQ $0D
;ORG $02A506
;LDA #$32
;-----------------------------------------------------------------------------------------------------------

ORG $02A4CD ; go to beginning of the rain animation code (command A58A)

JSL $3F9C00 ; overwrite this with a long jump to expanded space
CMP #$01 ; in the new routine i will set the accumulator to 0x01 to indicate that we used the rain animation, otherwise 0x00
BEQ $0E ; so if we want to use the rain animation, branch to this routine in the original code
BRA $55 ; we don't want to use the rain animation, jump to the RTL in the original code

ORG $3F9C00 ; go to expanded space

LDA $7EF3C5     ; load game state
CMP #$02    ; test for beginning
BCS $03    ; if not beginning, jump to next test
LDA #$01 ; set rain animation indicator
RTL

LDA $8A         ; load ACTUAL area

;for paste©
;CMP #$00 ; test if we are in this area
;BNE $03 ; if not, jump to next area
;LDA #$01 ; set rain animation indicator
;RTL

CMP #$00 ; test if we are in this area
BNE $03 ; if not, jump to next area
LDA #$01 ; set rain animation indicator
RTL

;dark world evil swamp, so test for evil-swamp-dungeon-is-opened is needed
CMP #$70        
BNE $0E
LDA $7EF2F0 ; test if evil swamp dungeon already opened
AND #$20        ; if yes, don't animate the rain
BNE $03
LDA #$01 ; set rain animation indicator
RTL
LDA #$00 ; unset rain animation indicator
RTL

LDA $8A         ; load ACTUAL area again

;no match
LDA #$00 ; unset rain animation indicator
RTL

;Between the above and the next code there should be enough space to test every area or to test for self-defined events
;in some areas. If you still need more, you need to move it more forward.

;THIS IS THE MOUNTAIN-FLASHLIGHTS-CODE

ORG $0EF587 ; go to beginning of the flashlights code (command A58A)

JSL $3FA100 ; overwrite this with a long jump to expanded space
CMP #$01 ; in the new routine i will set the accumulator to 0x01 to indicate that we used the flashlights, otherwise 0x00
BEQ $06 ; so if we want to use the flashlights, branch to this routine in the original code
BRA $02 ; we don't want to use the flashlights, jump to the branch to the RTL in the original code

ORG $3FA100 ; go to expanded space

LDA $8A         ; load ACTUAL area

;for paste©
;CMP #$45 ;
;BNE $03 ;
;LDA #$01 ;
;RTL

CMP #$43 ; test if we are in this area
BNE $03 ; if not, jump to next area
LDA #$01 ; set flashlights indicator
RTL

CMP #$45 ;
BNE $03 ;
LDA #$01 ;
RTL

CMP #$47 ;
BNE $03 ;
LDA #$01 ;
RTL

;no match
LDA #$00 ; unset flashlights indicator
RTL

Just copy to a text document and save the file as overlay.asm or something else!

Requires a couple of trials and errors to get working for particular areas you want to add overlays... unless if youre of course familiar with asm or hex!

SePH
SePH

Several questions Image212

Since : 2012-06-19

Back to top Go down

Several questions Empty Re: Several questions

Post by Erockbrox on Tue 8 Oct 2019 - 1:11

God bless that unknown author of the rain activation code........ that helped a little.
Erockbrox
Erockbrox

Several questions Image214

Since : 2013-02-05

Back to top Go down

Several questions Empty Re: Several questions

Post by Jared_Brian_ on Tue 8 Oct 2019 - 2:34

SePH wrote:Just copy to a text document and save the file as overlay.asm or something else!
so how do i add asm patches? i managed to add one with asar171 but it doesn't look like that will allow me to remove patches later if i want to.
in hm it asks for the FSNASM compiler which after some digging i managed to find here:
[You must be registered and logged in to see this link.]
but it still gives me errors every other line of code while trying to compile it.
i also tried xkas as suggested in this post:
[You must be registered and logged in to see this link.]
but i couldnt seem to use it to remove patches either.

Jared_Brian_
Hardhat Beetle
Hardhat Beetle

Since : 2019-05-06

Back to top Go down

Several questions Empty Re: Several questions

Post by SePH on Tue 8 Oct 2019 - 20:25

Most Zelda3 asm patches on zeldix are meant to be used with xkas, so Id suggest you use that.

To remove an asm patch, make a backup of the rom before applying a patch and then hex compare both roms and make notes of the changes to remove them manually later. Some people like Euclid, submit asm patches to restore the changes of an asm patch, but not everyone does this. Good luck!

@Erock: I believe the unknown author is d4s!
SePH
SePH

Several questions Image212

Since : 2012-06-19

Back to top Go down

Back to top


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