Random Questions Pertaining to Zelda 3 Hacking

Page 2 of 2 Previous  1, 2

Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Puzzledude on Mon 19 Feb 2018 - 14:44

Having said that, I'm wondering if something could be done that's fairly similar to Con's ice rod mod where a water tile is replaced with an ice tile. Perhaps I could assemble a new bush tile other than tile 54, and when Link cuts or lifts it, a hole appears instead of a stump.  I've tried assembling a new bush tile to see what would happen, and it didn't work properly.  So I'm guessing the code is tied to tile 54.  So I'm wondering if it's possible to trace that code, insert a copy of it at the end of the rom, and modify it to work with a new bush tile that reveals a hole once the bush is cut or lifted.  Either way, this is something that can come later if it's possible.
Definitely doable. Maybe even without Conn's ice rod ASM. Basically you need to find the tile which get loaded under the bush when the bush is lifted. Once you find it, you can gfx change it into a hole and type-change it to falling-type.

With ice rod ASM it's also doable by manipulating the type to react on ice rod. I already made the adoptation where you freeze bushes with the ice rod. So its 1 byte which controls the type to react to: you change this from deep water type to bush type. Now you change the gfx of the ice tile into a pit looking one and in the final step you change the properties of the reloaded tile to pit-type instead of ice-type.

But the problem is this: where should you land when falling into the pit. You will always fall in Houlihan room. Only one overworld area can have damage-pits, while all cut bushes will produce a hole.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Jeimuzu on Sat 24 Feb 2018 - 0:30

Puzzledude wrote:Definitely doable. Maybe even without Conn's ice rod ASM. Basically you need to find the tile which get loaded under the bush when the bush is lifted. Once you find it, you can gfx change it into a hole and type-change it to falling-type.

With ice rod ASM it's also doable by manipulating the type to react on ice rod. I already made the adoptation where you freeze bushes with the ice rod. So its 1 byte which controls the type to react to: you change this from deep water type to bush type. Now you change the gfx of the ice tile into a pit looking one and in the final step you change the properties of the reloaded tile to pit-type instead of ice-type.

But the problem is this: where should you land when falling into the pit. You will always fall in Houlihan room. Only one overworld area can have damage-pits, while all cut bushes will produce a hole.

Right.  If it must involve editing the stump tile (tile loaded under the bush) resulting in all bushes having holes under them, then it would be best to leave the holes exposed.  I guess it depends on how complicated it would be to write an ASM hack that would allow Area 81 to have both.  

If it isn't too difficult to trace the code that provides the instructions for the bush tile to be replaced with a stump, then perhaps a copy of that code could be inserted at the end of the rom and applied to a tile other than tile 54 (the bush tile).  For example, tile 3231 is part of the Master Sword pedestal which won't be in this hack.  So I'm wondering if that code could then be pointed to tile 3231 if I were to make it a second bush tile.  And the hole tile loads instead of the stump tile by changing a certain amount of bytes within the copied code.  Correct me if I'm wrong, but I think ASM would only be required to tell the code which tile to point to.

Anyway, you may have already known what I was talking about the first time.  I just felt like I didn't explain it well enough. As always, I appreciate your input.
avatar
Jeimuzu



Since : 2015-10-01

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Jeimuzu on Thu 18 Oct 2018 - 20:03

So I was wondering if there might be any documentation for the item menu.  The mirror will not be obtainable in my hack.  So I would like the shovel to go in it's slot. 

I did some digging, but my key words didn't pull anything up.  It seems like it would be a matter of changing a handful of bytes.
avatar
Jeimuzu



Since : 2015-10-01

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Puzzledude on Fri 19 Oct 2018 - 9:29

So I was wondering if there might be any documentation for the item menu. The mirror will not be obtainable in my hack. So I would like the shovel to go in it's slot.
Long story short - this is not happening (yet doable). This takes a huge amount of ASM and is heavily sensitive to bugs, if you do it. The best choice is to leave the menu items in the exact order as they are in the original.

avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by SePH on Fri 19 Oct 2018 - 16:45

It has been done in the past Puzz, don't you remember ;-)

Relevant thread for you Jeimuzu (you should have access):

[You must be registered and logged in to see this link.]

But yeah, no documentation unless XaserLE documented this!



avatar
SePH



Since : 2012-06-19

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Puzzledude on Fri 19 Oct 2018 - 18:13

Yes, I do. The first one to make this was XaserLe, and this is his quote:
(It's around 1000 lines of assembler code.)
I also beta tested this and found further problems with the PoC hack on this, namely in-game item use gfx bugs.

All I'm saying is, shuffling the menu items is not worth the effort it takes to make.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Jeimuzu on Sat 20 Oct 2018 - 12:12

Well I plan to use Conn's shovel ASM to dig up heart pieces.  In order for that to work, the shovel can't be a temporary item.  Fortunately, this is the only menu edit I wish to make.
avatar
Jeimuzu



Since : 2015-10-01

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Conn on Sat 20 Oct 2018 - 15:24

As for the ice, rod, I found this asm:

Code:

; This ASM was written by Conn
; This is a ASM FrontEnd Code for Zelda ALTTP (US, no header) to change tiles with icerod.
; Main idea is use icerod to freeze water to ice.


lorom


org $088a5d ; jsl to main code
jsl $0efba0


org $0efba0 ; main code
STA $03E4,x ; load native value
TAY
LDA $008C ; check if you're on overworld
BNE $01
RTL
LDA $03A3 ; disable other flying object icing water (boomerang, sword beam)
CMP #$06
BEQ $01
RTL
CPX #$04 ; check if ice shot #1 only is used (disable 2nd shot to ice)
BEQ $01
RTL
LDA $03E8 ; check if ice shot is on water tiles
CMP #$08
BEQ $08
LDA $03E8 ; check if ice shot is on native unused, edited blocks
CMP #$03
BEQ $01
RTL
LDA $0303 ;  check if ice shot is used
CMP #$06
BEQ $01
RTL
LDA $0354 ; check if sword is used
CMP #$27
Bne $01
RTL
TXA
STA $7f5014 ; store native x value into ram to regain after code
LDA $4212 ; wait for vblank to enable dma transfer
AND #$80
BEQ $F9
REP #$30
LDA $2116
STA $7f5015 ; store native value to regain later
LDA $00 ; calculation procedure to get correct x,y coordinates for new tile
SEC
SBC $0708
AND $070A
ASL A
ASL A
ASL A
STA $06
LDA $02
SEC
SBC $070C
AND $070E
ORA $06
TAX
LDA #$00B7
STA $7E2000,x ; store new 16x16 ice tile into ram (property of tile!)
CLC
STZ $02 ; calculation procedure to get 8x8 vram map address (look of tile)
TXA
AND #$003F
CMP #$0020
BCC $05
LDA #$0400
STA $02
TXA
AND #$0FFF
CMP #$0800
BCC $07
LDA $02
ADC #$07FF
STA $02
TXA
AND #$001F
ADC $02
STA $02
TXA
AND #$0780
LSR A
ADC $02
STA $2116 ; store vram address for upper tile part (8x16) to $2116
STA $7f5017
LDA #$1D83 ; load new ice tiles
STA $7f5010
STA $7f5012
JSR $FD00 ; jsr to dma vram transfer for upper ice tile part
REP #$30
LDA $7f5017 ; regain vram address
ADC #$0020 ; add 20 for lower part (8x16) and store to $2116
STA $2116
JSR $FD00 ; jsr to dma vram transfer for lower ice tile part
LDA $7f5015 ; regain native register value
STA $2116
SEP #$30
LDA $7f5014 ; regain native x-value
TAX
RTL


org $0efd00 ; vram dma transfer
LDA #$007f ; load origin of bytes to transfer (7E/d000)
STA $4304
LDA #$5010
STA $4302
SEP #$30
LDA #$18 ; bus
STA $4301
LDA #$04 ; transfer 4 bytes
STA $4305
LDA #$01
STA $4300
STA $420B ; make dma transfer
RTS


; bug fix to not swim through tiles but jump onto them

org $07dc9e
jsl $0efc80
nop

org $0efc80
LDA $0A
TSB $0343
TSB $0348
RTL

; bug fix to stop gliding on shallow water when leaving ice tile

org $07dd1b
jsl $0efc90
nop

org $0efc90
LDA $0A
TSB $0359
LDA $0350
CMP #$0100
BNE $03
STZ $034A
RTL


org $0e95dc ; get a 0e written here (first byte) to enable gliding on new tiles
ASL $5757

org $0f85b8 ; get new tile values (83 1d) written 4 times here
STA $1D,s
STA $1D,s
STA $1D,s
STA $1D,s

Stuff you may wish to edit:

LDA $03E8 ; check if ice shot is on water tiles
CMP #$08

LDA #$00B7
STA $7E2000,x ; store new 16x16 ice tile into ram (property of tile!)

LDA #$1D83 ; load new ice tiles
STA $7f5010


Not sure if it helps, was years ago when I made that code


As for heart piece dig up,
[You must be registered and logged in to see this link.]
avatar
Conn



Since : 2013-06-30

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Jeimuzu on Thu 25 Oct 2018 - 18:04

Thanks Conn.  I do have plans for the Ice Rod ASM as well.  Smile


So I've recently decided to go ahead and build one of my dungeons into a ROM, and I've already run into problems while working on the second room.  I have BG2 set to Translucent because one room will have deep water.  In a room with shallow water, I get the following side effect:

[You must be registered and logged in to see this link.]

I don't know if it's data corruption, a Hyrule Magic bug, or just a mistake on my end.  I did remove data from other rooms to avoid overloading the rom with too many background objects and corrupting the rom that way.  Ironically, I'm wondering if that may have been the wrong way to go, lol.

Update:  Okay, so I decided to replicate this issue in a clean rom, and lo and behold, the same issue occurred.  I thought it might just be an issue with room 152 (Misery Mire entrance), but I've tested this in multiple rooms.  In the Swamp Palace room where you drain the water (room 118), this doesn't occur.

Update:  So bg object 0C6 on layer 2 solves the problem.  It just threw me off because 0C6 wasn't used in room 118, and I was using that room as an example for setting up mine. Embarassed

Anyone know why this might be the case?  I'm just curious.
avatar
Jeimuzu



Since : 2015-10-01

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Jeimuzu on Sun 4 Nov 2018 - 14:53

At this point, I have the entire dungeon build into a rom, and I've run into one issue that has me really concerned. For some reason, sprites don't spawn in my B1 rooms. The rooms are 165, 180, 181, 196, 197, 212, and 213. You enter the basement via stair cases in rooms 196 and 212.

The only way I can get the sprites to appear is by entering entrance 08 (Eastern Palace), and falling through a hole into room 213.

Puzzledude, I'm wondering if the Hex Glue method could be used to address this issue by building the layout of the culprit room into another room, and then just copy the data back to the room I wish to use.

Anyone ever encounter this sort of problem?
avatar
Jeimuzu



Since : 2015-10-01

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Puzzledude on Thu 8 Nov 2018 - 13:11

Yes, I encountered this problem once. In fact the Bruce Campbel hack has this problem, where it does not spawn sprites in one of the floors of the Ganon's tower, while the sprites are inserted via HM. There is no explanation for this and the problem can only be solved with ASM tracing.

Hex gluing will not help here at all, since it is extra complex when handling sprites and you would achieve the same thing, you have now - the code is there, it's just not loading in-game.

This is the same as the sprite glitch. For unknow reasons the shadow under Link gets glitched into arrows sometimes when falling through a pit. Then the items under jars and sprite drops are also glitched until you re-enter the dungeon. Again no explanation, but general bugged rom, solvable via ASM or with a backup.

avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Jeimuzu on Thu 8 Nov 2018 - 17:46

Puzzledude wrote:Yes, I encountered this problem once. In fact the Bruce Campbel hack has this problem, where it does not spawn sprites in one of the floors of the Ganon's tower, while the sprites are inserted via HM. There is no explanation for this and the problem can only be solved with ASM tracing.
I've thought about using different rooms, but I'm hoping to avoid this solution because I'm trying to keep everything as compact as possible. Moreover, I don't even know if this would solve the problem.  I made this graph to keep track of where everything goes if anyone wants a copy:
[You must be registered and logged in to see this link.]

Puzzledude wrote:Hex gluing will not help here at all, since it is extra complex when handling sprites and you would achieve the same thing, you have now - the code is there, it's just not loading in-game.
Good to know.  While we're on this subject, is there any way I could get a copy of the rest of your pointers?  I know it's a big request so no hard feelings if the answer is no.  Especially since I don't know if this is something you already have assembled, or if you just know how to assemble it, lol.

Also, when you sent me a copy of the room header pointers a year ago, I vaguely remember you suggesting that I insert the default settings for each room.  It didn't occur to me until much later that you might want me to show that I could do it before you sent me the rest.  That said, I have that completed if you want me to send you a patch.

Puzzledude wrote:This is the same as the sprite glitch. For unknow reasons the shadow under Link gets glitched into arrows sometimes when falling through a pit. Then the items under jars and sprite drops are also glitched until you re-enter the dungeon. Again no explanation, but general bugged rom, solvable via ASM or with a backup.
I've had this happen before.  Although in my case, it was related to editing the title screen.  But it was well over a decade ago so I'm not entirely sure what the issue was, lol.  The game probably didn't appreciate me using a certain tile.
avatar
Jeimuzu



Since : 2015-10-01

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Puzzledude on Fri 9 Nov 2018 - 11:38

Good to know. While we're on this subject, is there any way I could get a copy of the rest of your pointers? I know it's a big request so no hard feelings if the answer is no. Especially since I don't know if this is something you already have assembled, or if you just know how to assemble it, lol.
Sent you this via Personal Message.

It didn't occur to me until much later that you might want me to show that I could do it before you sent me the rest.
No, that's not it. I forgot about this, and didn't know you still want them. Also do note: you can easily calculate these pointers, since they use the exact same data block per room. If you have one bank of 8000, you just need to devide this by the number of rooms+ 1 line for each room for the text which room it is.
avatar
Puzzledude



Since : 2012-06-20

Back to top Go down

Re: Random Questions Pertaining to Zelda 3 Hacking

Post by Sponsored content


Sponsored content


Back to top Go down

Page 2 of 2 Previous  1, 2

Back to top


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