I need help with my hack :-D

Page 1 of 2 1, 2  Next

Go down

I need help with my hack :-D Empty I need help with my hack :-D

Post by Spane Tue 1 Apr 2014 - 14:55

I've used the two tilesets of the original death mountain as seen in the original game and one other tileset I haven't used before. Because in this area i wouldn't use any houses I've used the graphic shemes to redo the tilesets as seen in the picture below. And yes that are all tiles for this enourmos tower :-D Not much, right? :-D

For this tower I've used a giant amount of blocks and small blocks. I think I used about 250 small blocks :-D

I have a question! I like your idea of the tardis key. I mean i like it when the player will be ported to the end of the dungeon if he has not this one special item. Can i use this concept for this dungeon also? Because the player of my game can already visit this dungeon on the first part of the game but it will be the last dungeon. So he can not have progress i wanted to use your idea with the tardis key. Of course I will couple it on another option :-)

Spane

I need help with my hack :-D Image213

Since : 2013-01-22

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Tue 1 Apr 2014 - 21:15

well... it's not that easy. I installed the game time Counter first as a base of this hack. But you don't Need to; both would Need the same place to hook though!

Basically you Need 2 addresses to hook:
hook 1: store beginning value
Every time you enter a dungeon of your choice (trace when entrance value gets written to $010e) store a start value of maybe 10 seconds to an unused ram (I used 7e/e002, 2 Bytes. 7e/e000 is used for the Play time counter).
So if you want a Minute, store 0e10 there. For each second less, substract 3c; e.g., so 10 seconds is 0258.

Here's a code for hook1 (note, the value can be stored every time, even if it is not a timed dungeon entrance):
Code:

http://zeldix.forumotion.com/t459-have-limited-time-in-a-dungeon-until-you-have-a-specific-item#4107


Hook 2: install a time Counter:
I hooked at a frequent address, when the joypad press is read. This one is called each cycle, one second is 60 (hex 3c) cycles, means every 0e10 cycles you have a full Minute.

So the address that is read each cycle and you want to hook is pc: 00/03eb: a5 01 85 f0

Now substract every cycle 1 from the beginning value of 7e/e002 (decA), if you are in the dungeon that requires the item (check with $1b, $010e, item, etc)... When it reaches 00 00 make store the value #$19 to ram $11 (try with geiger) and you are happily transported to the entrance. You of course Need to reset the 10 seconds and also give the warp Sound #$33 to $012e.

At the end of your Routine you must store $01 to $f0 (a50185f0) of course so your joypad Input is read again and you can of course also Display a timer in the hud... which is quite difficult.
Hex dec conversation. Take the value, substract 0a and Loop if no carry is set (you didn't come below 00). At the end you have your hex value transformed into dec.


Here's the code for hook 2
Code:

http://zeldix.forumotion.com/t459-have-limited-time-in-a-dungeon-until-you-have-a-specific-item#4107


Last edited by Conn on Wed 2 Apr 2014 - 18:05; edited 2 times in total
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Wed 2 Apr 2014 - 8:29

needed to edit a lot in above code to minimize the probability for bugs... and gave an example for hook1. Hopefully it helps.
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Spane Wed 2 Apr 2014 - 14:27

Thank you a lot! I will give it to my asm genius.

Spane

I need help with my hack :-D Image213

Since : 2013-01-22

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Spane Wed 2 Apr 2014 - 14:42

Ok a lot to do :-D But a few is done and a lot has been done in the last few weeks :-)

I need help with my hack :-D 10177318_615647455185132_750529002_n

Spane

I need help with my hack :-D Image213

Since : 2013-01-22

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Wed 2 Apr 2014 - 18:04

I made a complete, full working ASM, XaserLE can easily adjust:

http://zeldix.forumotion.com/t459-have-limited-time-in-a-dungeon-until-you-have-a-specific-item#4107

Take this asm, since I tested it already completely - it also takes the big number gfx natively in the 2bpp menu; the table is part of the asm.
The countdown timer appears maybe displaced, but it is the only place not used in 24 items and native Zelda menu (and I usually hack for both).
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Puzzledude Wed 2 Apr 2014 - 18:27

I just wanted to ask you Conn, what would the code be, if we want to have the first 5 crystals, instead of Magic Mirror or Moonpearl.
 
I'm assuming that this part:
lda $7ef357; ram for moonpearl
cmp #$01; compare to 01= have it, 00= don't have it
 
would have to repeat 5 times, with the correct ram for all the five crystals?
Puzzledude
Puzzledude

I need help with my hack :-D Image213

Since : 2012-06-20

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Puzzledude Wed 2 Apr 2014 - 18:52

I've tested this out on Pendants:
it is just one RAM value with various byte values:
 
 
7EF374, cmp 04, Pendant 1
7EF374, cmp 02, Pendant 2
7EF374, cmp 01, Pendant 3
 
7EF374, cmp 06, Pendant 1+2
7EF374, cmp 05, Pendant 1+3
7EF374, cmp 03, Pendant 2+3
7EF374, cmp 07, Pendant 1+2+3
 
 
similar for crystals at
7EF37A, cmp 7F is all crystals
 
 
this is one awesome ASM feature, and incredibly useful,
since it can basically be used as 7 crystal barrier!
Puzzledude
Puzzledude

I need help with my hack :-D Image213

Since : 2012-06-20

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Wed 2 Apr 2014 - 20:05

The crystals are a bitwise Operation.
You see, hex 7f is bin 1111111. To test if you a specific amount of crystals you Need to do an and op:
and $01 (test have 1st crystal)
and $02 (test have 2nd crystal)
and $04 (test have 3rd crystal)
and $08 (test have 4th crystal)
and $10 (test have 5th crystal)
and $20 (test have 6th crystal)
and $40 (test have 7th crystal)


Here's the adjusted code, I cannot give guarantees though (but tested and Looks good so far). You find the new code with the bit test the very end of the asm):

Code:

lorom


org $1bbd66
JSL $07f900   ; start value set




org $07f900
STZ $4D                 ; restore overwritten values by hook
STZ $46    
REP #$30              
LDA #$0384             ; 0384=15 seconds !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
STA $7EE002
SEP #$30              
RTL

org $0083f4
JSL $07f920  ;maincode

org $07f920      ;maincode
sta $f4          ; restore overwritten code
sty $f8
jmp crystals

newtimer:
lda $1b   ; check if you're in a dungeon
beq end
lda $010e ; load entrance!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
cmp #$YY ; check if you're in your timed dungeon
bne end
lda $10     ; if $10 is not #$07 you're in the menu or talking to a Person. We Need to pause the timer, otherwise the game will break!
cmp #$07
bne end2  ; end2 here since you do not want to have the timer transparent
lda $5b   ; check whether you are falling in a pit
bne end2

bra timer  ; if all checked run the timer code
 
end:            ; here you land if you are not in a timed dungeon

REP #$30                
LDA #$207f ; is transparent to hide timer
STA $7EC7ee  ; store into hud
STA $7EC7f0    
STA $7EC82e
STA $7EC830    
end2:
SEP #$30  
RTL    

timer:  ; here you land if timer is enabled
REP #$30      
LDA $7EE002
DEC A                  
STA $7EE002   ; decrease beginning value each cycle
BNE counter          ; if not00 00 go to Counter

; here you land if timer is 00 00
LDA #$0384          ; reset beginning value (15 seconds here)  !!!!!!!!!!!!!!!!!!  
STA $7EE002  
SEP #$30    
stz $0112             ; only needed if you Play with complete items hack (enables menu after hookshot use)          
LDA #$19                ; warp to entrance
STA $11    
LDA #$33                ; Play warp sound
STA $012E  
RTL    

; here you land if timer is not 00 00
counter:
LDY #$0000              ; check if Counter value is > 3c, 3c is 1 second
CMP #$003C            
BCC $08    
SEC                    
SBC #$003C              
NOP                    
INY                    
BRA $F3      ;Loop until the value is <00 so you have the cycles calculated in seconds
SEP #$30                
STA $00      ; don't overwrite $01 since this is your Joystick value, therefore a sep 30
TYA                    
LDY #$00              
CMP #$0A    ; hex to dec conversation loop          
BCC $07    
SEC                    
SBC #$0A                
INY                    
INY                    
BRA $F5    
STA $00    
TYA                    
ASL A                  
ASL A                  
ASL A                  
ORA $00    
STA $00          ;
AND #$0F   ; here you want to have the seconds x0-x9              
ASL A                  
TAX                    
REP #$30                
LDA $07fa00,x ; this is a table which upper gfx (tile and Palette) part to take (0-9)
STA $7EC7f0     ; store into hud
LDA $07fa20,x  ; lower part of the number gfx
STA $7EC830     ; store into hud
SEP #$30                
LDA $00    
AND #$F0          ; here you want to have the decimal seconds 0x-5x
LSR A                  
LSR A                  
LSR A                  
TAX                    
REP #$30                
LDA $07fa00,x
STA $7EC7ee
LDA $07fa20,x
STA $7EC82e
Sep #$30
RTL    


org $07fa00   ; set in the tiles to display
ASL $0825  
AND $09    
AND $09    
AND $0A    
AND $0B    
AND $0C    
AND $0D    
AND $1D    
AND $1C    
SBC $7F    
BRK #$FF              
SBC $FFFFFF,x
SBC $FFFFFF,x
SBC $18A50E,x
AND $19    
AND $09    
LDA $1A    
AND $1B    
AND $1C    
AND $18    
AND $1D    
LDA $0C    
SBC $7F    
BRK #$FF  

org $07fa40 ; new code
crystals:
ldy #$00  ; set Y Register to 00
lda $7ef37a
and #$01   ; test 1st Crystal
beq $01
iny              ; if you have it increase Y
lda $7ef37a ; test all other bits
and #$02
beq $01
iny
lda $7ef37a
and #$04
beq $01
iny
lda $7ef37a
and #$08
beq $01
iny
lda $7ef37a
and #$10
beq $01
iny
lda $7ef37a
and #$20
beq $01
iny
lda $7ef37a
and #$40
beq $01
iny
cpy #$05      ; compare whether you collected 5 (or more)
bcs $03        ; if you have more crystals (carry set, go to jmp end, disables timer)
jmp newtimer        ; if not proceed
jmp end


Last edited by Conn on Thu 3 Apr 2014 - 10:20; edited 2 times in total
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Spane Thu 3 Apr 2014 - 6:05

Now an another question, only a question. Might it be possible to increase the time you have in the dungeon with each crystal you get?

E. g.
1 crystal - 10 sec
2 crystals - 20 sec
and so on and if you have all crystals you have unlimited time.

Spane

I need help with my hack :-D Image213

Since : 2013-01-22

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Thu 3 Apr 2014 - 6:42

Puzz, in above code I've forgotten to set the start value, please recopy if you copied the code before reading this post.


Spane, try this. At the end of the code you will find the check for crystals. The start value here is 15 seconds, and each Crystal gives you 5 seconds, which will be stored to 7ee004. You can tinker with it, but have a start value and don't extend 1 Minute (0e10) with 7 crystals. Also I disabled the countdown when having all 7 crystals

Code:

lorom


org $1bbd66
JSL $07f900   ; start value set

org $07f900
STZ $4D                 ; restore overwritten values by hook
STZ $46    
jsr crystals             ; get your start time, check further down!
          
STA $7EE002
SEP #$30              
RTL

org $0083f4
JSL $07f920  ;maincode


org $07f920      ;maincode
sta $f4          ; restore overwritten code
sty $f8
lda $7ef37a
cmp #$7f
beq end
lda $1b   ; check if you're in a dungeon
beq end
lda $010e ; load entrance!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
cmp #$YY ; check if you're in your timed dungeon
bne end
lda $10     ; if $10 is not #$07 you're in the menu or talking to a Person. We Need to pause the timer, otherwise the game will break!
cmp #$07
bne end2  ; end2 here since you do not want to have the timer transparent
lda $5b   ; check whether you are falling in a pit
bne end2

bra timer  ; if all checked run the timer code
 
end:            ; here you land if you are not in a timed dungeon

REP #$30                
LDA #$207f ; is transparent to hide timer
STA $7EC7ee  ; store into hud
STA $7EC7f0    
STA $7EC82e
STA $7EC830    
end2:
SEP #$30  
RTL    

timer:  ; here you land if timer is enabled
REP #$30      
LDA $7EE002
DEC A                  
STA $7EE002   ; decrease beginning value each cycle
BNE counter          ; if not00 00 go to Counter

; here you land if timer is 00 00
LDA $7ee004          ; reset beginning value
STA $7EE002  
SEP #$30    
stz $0112             ; only needed if you Play with complete items hack (enables menu after hookshot use)          
LDA #$19                ; warp to entrance
STA $11    
LDA #$33                ; Play warp sound
STA $012E  
RTL    

; here you land if timer is not 00 00
counter:
LDY #$0000              ; check if Counter value is > 3c, 3c is 1 second
CMP #$003C            
BCC $08    
SEC                    
SBC #$003C              
NOP                    
INY                    
BRA $F3      ;Loop until the value is <00 so you have the cycles calculated in seconds
SEP #$30                
STA $00      ; don't overwrite $01 since this is your Joystick value, therefore a sep 30
TYA                    
LDY #$00              
CMP #$0A    ; hex to dec conversation loop          
BCC $07    
SEC                    
SBC #$0A                
INY                    
INY                    
BRA $F5    
STA $00    
TYA                    
ASL A                  
ASL A                  
ASL A                  
ORA $00    
STA $00          ;
AND #$0F   ; here you want to have the seconds x0-x9              
ASL A                  
TAX                    
REP #$30                
LDA $07fa00,x ; this is a table which upper gfx (tile and Palette) part to take (0-9)
STA $7EC7f0     ; store into hud
LDA $07fa20,x  ; lower part of the number gfx
STA $7EC830     ; store into hud
SEP #$30                
LDA $00    
AND #$F0          ; here you want to have the decimal seconds 0x-5x
LSR A                  
LSR A                  
LSR A                  
TAX                    
REP #$30                
LDA $07fa00,x
STA $7EC7ee
LDA $07fa20,x
STA $7EC82e
Sep #$30
RTL    


org $07fa00   ; set in the tiles to display
ASL $0825  
AND $09    
AND $09    
AND $0A    
AND $0B    
AND $0C    
AND $0D    
AND $1D    
AND $1C    
SBC $7F    
BRK #$FF              
SBC $FFFFFF,x
SBC $FFFFFF,x
SBC $18A50E,x
AND $19    
AND $09    
LDA $1A    
AND $1B    
AND $1C    
AND $18    
AND $1D    
LDA $0C    
SBC $7F    
BRK #$FF  

org $07fa40 ; new code
crystals:

ldy #$0000  ; set Y Register to 00
sep #$30
lda $7ef37a
and #$01   ; test 1st Crystal
beq $01
iny              ; if you have it increase Y
lda $7ef37a ; test all other bits
and #$02
beq $01
iny
lda $7ef37a
and #$04
beq $01
iny
lda $7ef37a
and #$08
beq $01
iny
lda $7ef37a
and #$10
beq $01
iny
lda $7ef37a
and #$20
beq $01
iny
lda $7ef37a
and #$40
beq $01
iny
rep #$30
lda #$0384    ;set start value!!!!!!!!!!!!!!!! 0384=15 seconds
cpy #$0000
BEQ $07    
CLC                    
ADC #$012C    ; add 5 seconds for each crystal !!!!!!!!!!!!!!!!!!              
DEY                    
BRA $F4
sta $7ee004
rts





Last edited by Conn on Thu 3 Apr 2014 - 10:21; edited 1 time in total
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Puzzledude Thu 3 Apr 2014 - 9:34

This 2 new codes don't seem to be working, but that's ok, the initial ASM code is perfect enough.
 
 
So if I do a AF 7A F3 7E C9 57 at 3F925, I get what I need! (tested to). Since 5 crystals are maximum in my case (so having 6 or 7 would bring the counter up again, but this is not possible in my case). And the cmp 57 is a specific order: crystals 1,2,3,5,6 in the game, but crystals 2,5,7,3,1= 1,2,3,5,7 in BIN.
------
 
And the 7 crystal barrier is
AF 7A F3 7E C9 7F
removes counter if you have all 7 crystals
------
 
And the 3 pendant barrier is
AF 74 F3 7E C9 07
removes counter if you have all 3 pendants
------
  
2 different crystal orders:
 
1.) Crystal BIN order:
01,02,04,08,10,20,40
 
this is for crystals in left-to-right order
 
 
 
2.) The Alttp order:
2,5,7,6,3,1,4
02,10,40,20,40,01,08
 
this is for crystals in clockwise order as in Alttp normal progression, so:
 
dark palace, water temple, wood dungeon, town dungeon, ice dungeon, mud dungeon, mountain dungeon
 
entrance dungeon definitions:
dark, water, wood, town, ice, mud, mountain
 
bin hex values for the upper order:
02,10,40,20,04,01,08
Puzzledude
Puzzledude

I need help with my hack :-D Image213

Since : 2012-06-20

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Thu 3 Apr 2014 - 10:23

God damnit, forgot the jsl to main code... hacking brain damage it does @_@

I added the following code to the two asm I provided at the previous page - please recopy them.
Code:

org $0083f4
JSL $07f920   ;maincode

Now everything should work, please test though!


So if I do a AF 7A F3 7E C9 57 at 3F925, I get what I need! (tested to). Since 5 crystals are maximum in my case (so having 6 or 7 would bring the counter up again
If you try the first code I provided on previous page it now won't Show up also at 6 or 7. I see that you understand how it works since hex57 is bin1010111, so you exactly know which crystals you collect. But with my (now hopefully working code) you won't Need to make the checkings which Crystal you collect where; the and function checks every of the 7 bits and calculate each Crystal up.  Wink

When you modify the asm I provided please ensure that the additional code does not overwrite some other code:
3f/900: initial Setting (Little space until you reach main code)
3f/920: main code (Little space until you reach gfx pointer)
3f/a00: gfx pointer upper part
3f/a20: gfx pointer lower part
3f/a40: new code to make the Crystal selection (here you have some space until 3f/b00 where some other code by me starts (should be superbomb code)
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Puzzledude Thu 3 Apr 2014 - 13:48

This is great. It all works.
 
And for Spane, here is the Hex decoding:
 
Code:
***********************************
------DUNGEON-COUNTER-HEX----------
***********************************

ASM by Conn!
Written by Puzzledude



***********************************
A) INITIAL DUNGEON COUNTER CODE
***********************************


HEX CHANGES

at
3F4, (new jump)
22 20 F9 07


at
3F900, (main code)
64 4D 64 46 C2 30 A9 84 03 8F 02 E0 7E E2 30 6B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 85 F4 84 F8 AF 53 F3 7E C9 02 F0 17 A5 1B F0 13 AD 0E 01 C9 26 D0 0C A5 10 C9 07 D0 1B A5 5B D0 17 80 18 C2 30 A9 7F 20 8F EE C7 7E 8F F0 C7 7E 8F 2E C8 7E 8F 30 C8 7E E2 30 6B C2 30 AF 02 E0 7E 3A 8F 02 E0 7E D0 16 A9 84 03 8F 02 E0 7E E2 30 9C 12 01 A9 19 85 11 A9 33 8D 2E 01 6B A0 00 00 C9 3C 00 90 08 38 E9 3C 00 EA C8 80 F3 E2 30 85 00 98 A0 00 C9 0A 90 07 38 E9 0A C8 C8 80 F5 85 00 98 0A 0A 0A 05 00 85 00 29 0F 0A AA C2 30 BF 00 FA 07 8F F0 C7 7E BF 20 FA 07 8F 30 C8 7E E2 30 A5 00 29 F0 4A 4A 4A AA C2 30 BF 00 FA 07 8F EE C7 7E BF 20 FA 07 8F 2E C8 7E E2 30 6B 6B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 0E 25 08 25 09 25 09 25 0A 25 0B 25 0C 25 0D 25 1D 25 1C E5 7F 00 FF FF FF FF FF FF FF FF FF FF 0E A5 18 25 19 25 09 A5 1A 25 1B 25 1C 25 18 25 1D A5 0C E5 7F 00 FF FF FF FF FF FF FF FF FF FF


at
DBD66, (new jump)
22 00 F9 07

---------------------------


POSSIBLE ADJUSTMENTS

1.) adjust timer (default is 15 seconds: from 14 to 00)
3F907= 84 03 = timer (15 seconds), change accordingly

84 03= 384:3C= 0F= 15 in dec
reversed= 15 sec= 0F, x3C= 384= 84 03
5 sec= 05, x3C= 12C= 2C 01 (for 5 seconds)


2.) adjust item to prevent timer (default is mirror)
3F925= AF, 53 F3 7E, C9 02 = AF, reversed= 7EF353= ram, cmp 02 (have mirror)

IF
AF 7A F3 7E C9 7F = remove counter if all 7 crystals= 7 crystal barrier

IF
AF 74 F3 7E C9 07 = remove counter if all 3 pendants= 3 pendant barrier



3.) adjust entrance of timed dungeon (default is 26 in my code)
3F934= entrance value in hex for the timed dungeon!
for instance 26 in Casino dungeon test


4.) repeat timer
3F969= repeat timer! = 84 03






*************************************
B) DUNGEON COUNTER (CRYSTAL BARRIER)
*************************************


HEX CHANGES

at
3F4,
22 20 F9 07


at
3F900,
64 4D 64 46 C2 30 A9 84 03 8F 02 E0 7E E2 30 6B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 85 F4 84 F8 4C 40 FA A5 1B F0 13 AD 0E 01 C9 26 D0 0C A5 10 C9 07 D0 1B A5 5B D0 17 80 18 C2 30 A9 7F 20 8F EE C7 7E 8F F0 C7 7E 8F 2E C8 7E 8F 30 C8 7E E2 30 6B C2 30 AF 02 E0 7E 3A 8F 02 E0 7E D0 16 A9 84 03 8F 02 E0 7E E2 30 9C 12 01 A9 19 85 11 A9 33 8D 2E 01 6B A0 00 00 C9 3C 00 90 08 38 E9 3C 00 EA C8 80 F3 E2 30 85 00 98 A0 00 C9 0A 90 07 38 E9 0A C8 C8 80 F5 85 00 98 0A 0A 0A 05 00 85 00 29 0F 0A AA C2 30 BF 00 FA 07 8F F0 C7 7E BF 20 FA 07 8F 30 C8 7E E2 30 A5 00 29 F0 4A 4A 4A AA C2 30 BF 00 FA 07 8F EE C7 7E BF 20 FA 07 8F 2E C8 7E E2 30 6B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 0E 25 08 25 09 25 09 25 0A 25 0B 25 0C 25 0D 25 1D 25 1C E5 7F 00 FF FF FF FF FF FF FF FF FF FF 0E A5 18 25 19 25 09 A5 1A 25 1B 25 1C 25 18 25 1D A5 0C E5 7F 00 FF FF FF FF FF FF FF FF FF FF A0 00 AF 7A F3 7E 29 01 F0 01 C8 AF 7A F3 7E 29 02 F0 01 C8 AF 7A F3 7E 29 04 F0 01 C8 AF 7A F3 7E 29 08 F0 01 C8 AF 7A F3 7E 29 10 F0 01 C8 AF 7A F3 7E 29 20 F0 01 C8 AF 7A F3 7E 29 40 F0 01 C8 C0 05 B0 03 4C 27 F9 4C 3E F9 FF FF FF FF FF


at
DBD66,
22 00 F9 07
------------




POSSIBLE ADJUSTMENTS


1.) adjust timer
at 3F907,
3F907= 84 03 = timer (15 seconds), change accordingly

84 03= 384:3C= 0F= 15 in dec
reversed= 15 sec= 0F, x3C= 384= 84 03
5 sec= 05, x3C= 12C= 2C 01 (for 5 seconds)


2.) adjust entrance of timed dungeon (default is 26 in my code)
3F92F= entrance value in hex for the timed dungeon!
for instance 26 in Casino dungeon test


3.) repeat timer
3F964= repeat timer! = 84 03


4.) adjust the number of crystals
3FA82,
05 by default= any 5 crystals

Counter deactivated if you have more crystals than entered value. So 05, counter active if 01,02,03,04 and not active if 05,06,07.

Entered value can be: 01,02,03,04,05,06,07

If value 07, we are dealing with the 7 crystal barrier!









*************************************************
C) DUNGEON COUNTER (MORE TIME WITH EACH CRYSTAL)
*************************************************


HEX CHANGES

at
3F4,
22 20 F9 07



at
3F900,
64 4D 64 46 20 40 FA 8F 02 E0 7E E2 30 6B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 85 F4 84 F8 AF 7A F3 7E C9 7F F0 17 A5 1B F0 13 AD 0E 01 C9 26 D0 0C A5 10 C9 07 D0 1B A5 5B D0 17 80 18 C2 30 A9 7F 20 8F EE C7 7E 8F F0 C7 7E 8F 2E C8 7E 8F 30 C8 7E E2 30 6B C2 30 AF 02 E0 7E 3A 8F 02 E0 7E D0 17 AF 04 E0 7E 8F 02 E0 7E E2 30 9C 12 01 A9 19 85 11 A9 33 8D 2E 01 6B A0 00 00 C9 3C 00 90 08 38 E9 3C 00 EA C8 80 F3 E2 30 85 00 98 A0 00 C9 0A 90 07 38 E9 0A C8 C8 80 F5 85 00 98 0A 0A 0A 05 00 85 00 29 0F 0A AA C2 30 BF 00 FA 07 8F F0 C7 7E BF 20 FA 07 8F 30 C8 7E E2 30 A5 00 29 F0 4A 4A 4A AA C2 30 BF 00 FA 07 8F EE C7 7E BF 20 FA 07 8F 2E C8 7E E2 30 6B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 0E 25 08 25 09 25 09 25 0A 25 0B 25 0C 25 0D 25 1D 25 1C E5 7F 00 FF FF FF FF FF FF FF FF FF FF 0E A5 18 25 19 25 09 A5 1A 25 1B 25 1C 25 18 25 1D A5 0C E5 7F 00 FF FF FF FF FF FF FF FF FF FF A0 00 00 E2 30 AF 7A F3 7E 29 01 F0 01 C8 AF 7A F3 7E 29 02 F0 01 C8 AF 7A F3 7E 29 04 F0 01 C8 AF 7A F3 7E 29 08 F0 01 C8 AF 7A F3 7E 29 10 F0 01 C8 AF 7A F3 7E 29 20 F0 01 C8 AF 7A F3 7E 29 40 F0 01 C8 C2 30 A9 84 03 C0 00 00 F0 07 18 69 2C 01 88 80 F4 8F 04 E0 7E 60 FF FF FF FF FF FF



at
DBD66,
22 00 F9 07
----------------


POSSIBLE ADJUSTMENTS


1.) adjust entrance of timed dungeon (default is 26 in my code)
3F934= entrance value in hex for the timed dungeon!
for instance 26 in Casino dungeon test


2.) adjust timer (default is 15 seconds)
at 3FA87,
3FA87= 84 03 = timer (15 seconds), change accordingly

84 03= 384:3C= 0F= 15 in dec
reversed= 15 sec= 0F, x3C= 384= 84 03
5 sec= 05, x3C= 12C= 2C 01 (for 5 seconds)


3.) add seconds for each crystal (default is 5 seconds)
3FA90, 2C 01 = 5 seconds (can be changed)
--------------------

0 crystals is 15 seconds (14 to 00)
1 crystal  is 20 seconds (19 to 00)
2 crystals is 25 seconds (24 to 00)
3 crystals is 30 seconds (29 to 00)
4 crystals is 35 seconds (34 to 00)
5 crystals is 40 seconds (39 to 00)
6 crystals is 45 seconds (44 to 00)
7 crystals is no timer (unlimited)




***********************************
------DUNGEON-COUNTER-HEX----------
***********************************


ASM by Conn!
Written by Puzzledude

Puzzledude
Puzzledude

I need help with my hack :-D Image213

Since : 2012-06-20

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Spane Thu 3 Apr 2014 - 13:52

Thank's Dude! You both are amazing :-)

Spane

I need help with my hack :-D Image213

Since : 2013-01-22

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Puzzledude Thu 3 Apr 2014 - 14:10

Main thanks goes to Conn, since he came up with those impossible Asm codes. It is easier for me to work in Hex, so I compared the version, which went through xkas asm iserter and the initial one, to see the hex changes.
 
Then followed the asm (!) marks to see where the adjustments are in hex, so you can change them directly with hex editor.
 
I will surely use this code in Gates of Time, probably as 5 crystal and 7 crystal barrier.
 
Also, don't forget to further test it all. I tested with cheats for different amount of crystals.
 
Tested:
A) initial code:
-15 seconds tested,
-changed the timer to 5 seconds, worked
-changed entrance to 01 (is house), timer worked
-changed mirror to moonpearl, worked
-changed mirror to 3 pendants, worked
-changed mirror to 7 crystals, worked
-changed mirror to 5 specific crystals (value 57), worked
 
all the above tested with cheats
 
 
B) crystal barrier:
-tested for any 01,02,03,04 crystals, timer is on
-tested for any 05,06,07 crystals, timer is off
-tested if changed to 07, any 01-06 timer on, if 07 then timer disabled
 
C) more timer for each crystal:
-tested with cheats:
5 seconds for any new crystal (tested with cheats for different amount of crystals)
Puzzledude
Puzzledude

I need help with my hack :-D Image213

Since : 2012-06-20

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Thu 3 Apr 2014 - 16:59

Happy here Smile
Amazing that hex is easier for you, but if you work your way through the asm you can modify the code much more and easier. If you e.g. want to have 2 dungeons, one with 5, the other with 7 Crystal barrier, try this (YY entrance1 5 crystals, ZZ entrance2, 7 crystals:

Code:

lorom


org $1bbd66
JSL $07f900   ; start value set




org $07f900
STZ $4D                 ; restore overwritten values by hook
STZ $46    
REP #$30              
LDA #$0384             ; 0384=15 seconds !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
STA $7EE002
SEP #$30              
RTL

org $0083f4
JSL $07f920  ;maincode

org $07f920      ;maincode
sta $f4          ; restore overwritten code
sty $f8
lda $1b   ; check if you're in a dungeon
beq end
lda $010e ; load entrance!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
cmp #$YY ; check if you're in your timed dungeon dungeon needing 5 crystals
bne check2
jsr crystals
cpy #$05      ; compare whether you collected 5 (or more)
bcs end        ; if you have more crystals (carry set, go to jmp end, disables timer)
bra newtimer        ; if not proceed

check2:
lda $010e ; load entrance!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
cmp #$ZZ ; check if you're in your timed dungeon dungeon needing 7 crystals
bne end
jsr crystals
cpy #$07      ; compare whether you collected 7 (or more)
bcs end        ; if you have more crystals (carry set, go to jmp end, disables timer)
bra newtimer        ; if not proceed

newtimer:
lda $10     ; if $10 is not #$07 you're in the menu or talking to a Person. We Need to pause the timer, otherwise the game will break!
cmp #$07
bne end2  ; end2 here since you do not want to have the timer transparent
lda $5b   ; check whether you are falling in a pit
bne end2

bra timer  ; if all checked run the timer code
 
end:            ; here you land if you are not in a timed dungeon

REP #$30                
LDA #$207f ; is transparent to hide timer
STA $7EC7ee  ; store into hud
STA $7EC7f0    
STA $7EC82e
STA $7EC830    
end2:
SEP #$30  
RTL    

timer:  ; here you land if timer is enabled
REP #$30      
LDA $7EE002
DEC A                  
STA $7EE002   ; decrease beginning value each cycle
BNE counter          ; if not00 00 go to Counter

; here you land if timer is 00 00
LDA #$0384          ; reset beginning value (15 seconds here)  !!!!!!!!!!!!!!!!!!  
STA $7EE002  
SEP #$30    
stz $0112             ; only needed if you Play with complete items hack (enables menu after hookshot use)          
LDA #$19                ; warp to entrance
STA $11    
LDA #$33                ; Play warp sound
STA $012E  
RTL    

; here you land if timer is not 00 00
counter:
LDY #$0000              ; check if Counter value is > 3c, 3c is 1 second
CMP #$003C            
BCC $08    
SEC                    
SBC #$003C              
NOP                    
INY                    
BRA $F3      ;Loop until the value is <00 so you have the cycles calculated in seconds
SEP #$30                
STA $00      ; don't overwrite $01 since this is your Joystick value, therefore a sep 30
TYA                    
LDY #$00              
CMP #$0A    ; hex to dec conversation loop          
BCC $07    
SEC                    
SBC #$0A                
INY                    
INY                    
BRA $F5    
STA $00    
TYA                    
ASL A                  
ASL A                  
ASL A                  
ORA $00    
STA $00          ;
AND #$0F   ; here you want to have the seconds x0-x9              
ASL A                  
TAX                    
REP #$30                
LDA $07fa00,x ; this is a table which upper gfx (tile and Palette) part to take (0-9)
STA $7EC7f0     ; store into hud
LDA $07fa20,x  ; lower part of the number gfx
STA $7EC830     ; store into hud
SEP #$30                
LDA $00    
AND #$F0          ; here you want to have the decimal seconds 0x-5x
LSR A                  
LSR A                  
LSR A                  
TAX                    
REP #$30                
LDA $07fa00,x
STA $7EC7ee
LDA $07fa20,x
STA $7EC82e
Sep #$30
RTL    


org $07fa00   ; set in the tiles to display
ASL $0825  
AND $09    
AND $09    
AND $0A    
AND $0B    
AND $0C    
AND $0D    
AND $1D    
AND $1C    
SBC $7F    
BRK #$FF              
SBC $FFFFFF,x
SBC $FFFFFF,x
SBC $18A50E,x
AND $19    
AND $09    
LDA $1A    
AND $1B    
AND $1C    
AND $18    
AND $1D    
LDA $0C    
SBC $7F    
BRK #$FF  

org $07fa40 ; new code
crystals:
ldy #$00  ; set Y Register to 00
lda $7ef37a
and #$01   ; test 1st Crystal
beq $01
iny              ; if you have it increase Y
lda $7ef37a ; test all other bits
and #$02
beq $01
iny
lda $7ef37a
and #$04
beq $01
iny
lda $7ef37a
and #$08
beq $01
iny
lda $7ef37a
and #$10
beq $01
iny
lda $7ef37a
and #$20
beq $01
iny
lda $7ef37a
and #$40
beq $01
iny
RTS


To go even more crazy, here's the code for a dungeon needing 5 crystals and another needing 3 Pendants:

Code:

lorom


org $1bbd66
JSL $07f900   ; start value set




org $07f900
STZ $4D                 ; restore overwritten values by hook
STZ $46    
REP #$30              
LDA #$0384             ; 0384=15 seconds !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
STA $7EE002
SEP #$30              
RTL

org $0083f4
JSL $07f920  ;maincode

org $07f920      ;maincode
sta $f4          ; restore overwritten code
sty $f8
lda $1b   ; check if you're in a dungeon
beq end
lda $010e ; load entrance!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
cmp #$YY ; check if you're in your timed dungeon dungeon needing 5 crystals
bne check2
jsr crystals
cpy #$05      ; compare whether you collected 5 (or more)
bcs end        ; if you have more crystals (carry set, go to jmp end, disables timer)
bra newtimer        ; if not proceed

check2:
lda $010e ; load entrance!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
cmp #$ZZ ; check if you're in your timed dungeon dungeon needing 3 pendants
bne end
jsr pendants
cpy #$03      ; compare whether you collected 3 pendants
bcs end        ; if you have 3 (carry set, go to end, disables timer)
bra newtimer        ; if not proceed

newtimer:
lda $10     ; if $10 is not #$07 you're in the menu or talking to a Person. We Need to pause the timer, otherwise the game will break!
cmp #$07
bne end2  ; end2 here since you do not want to have the timer transparent
lda $5b   ; check whether you are falling in a pit
bne end2

bra timer  ; if all checked run the timer code
 
end:            ; here you land if you are not in a timed dungeon

REP #$30                
LDA #$207f ; is transparent to hide timer
STA $7EC7ee  ; store into hud
STA $7EC7f0    
STA $7EC82e
STA $7EC830    
end2:
SEP #$30  
RTL    

timer:  ; here you land if timer is enabled
REP #$30      
LDA $7EE002
DEC A                  
STA $7EE002   ; decrease beginning value each cycle
BNE counter          ; if not00 00 go to Counter

; here you land if timer is 00 00
LDA #$0384          ; reset beginning value (15 seconds here)  !!!!!!!!!!!!!!!!!!  
STA $7EE002  
SEP #$30    
stz $0112             ; only needed if you Play with complete items hack (enables menu after hookshot use)          
LDA #$19                ; warp to entrance
STA $11    
LDA #$33                ; Play warp sound
STA $012E  
RTL    

; here you land if timer is not 00 00
counter:
LDY #$0000              ; check if Counter value is > 3c, 3c is 1 second
CMP #$003C            
BCC $08    
SEC                    
SBC #$003C              
NOP                    
INY                    
BRA $F3      ;Loop until the value is <00 so you have the cycles calculated in seconds
SEP #$30                
STA $00      ; don't overwrite $01 since this is your Joystick value, therefore a sep 30
TYA                    
LDY #$00              
CMP #$0A    ; hex to dec conversation loop          
BCC $07    
SEC                    
SBC #$0A                
INY                    
INY                    
BRA $F5    
STA $00    
TYA                    
ASL A                  
ASL A                  
ASL A                  
ORA $00    
STA $00          ;
AND #$0F   ; here you want to have the seconds x0-x9              
ASL A                  
TAX                    
REP #$30                
LDA $07fa00,x ; this is a table which upper gfx (tile and Palette) part to take (0-9)
STA $7EC7f0     ; store into hud
LDA $07fa20,x  ; lower part of the number gfx
STA $7EC830     ; store into hud
SEP #$30                
LDA $00    
AND #$F0          ; here you want to have the decimal seconds 0x-5x
LSR A                  
LSR A                  
LSR A                  
TAX                    
REP #$30                
LDA $07fa00,x
STA $7EC7ee
LDA $07fa20,x
STA $7EC82e
Sep #$30
RTL    


org $07fa00   ; set in the tiles to display
ASL $0825  
AND $09    
AND $09    
AND $0A    
AND $0B    
AND $0C    
AND $0D    
AND $1D    
AND $1C    
SBC $7F    
BRK #$FF              
SBC $FFFFFF,x
SBC $FFFFFF,x
SBC $18A50E,x
AND $19    
AND $09    
LDA $1A    
AND $1B    
AND $1C    
AND $18    
AND $1D    
LDA $0C    
SBC $7F    
BRK #$FF  

org $07fa40 ; new code
crystals:
ldy #$00  ; set Y Register to 00
lda $7ef37a
and #$01   ; test 1st Crystal
beq $01
iny              ; if you have it increase Y
lda $7ef37a ; test all other bits
and #$02
beq $01
iny
lda $7ef37a
and #$04
beq $01
iny
lda $7ef37a
and #$08
beq $01
iny
lda $7ef37a
and #$10
beq $01
iny
lda $7ef37a
and #$20
beq $01
iny
lda $7ef37a
and #$40
beq $01
iny
RTS

pendants:
ldy #$00  ; set Y Register to 00
lda $7ef374
and #$01   ; test 1st Pendant
beq $01
iny              ; if you have it increase Y
lda $7ef374 ; test all other bits
and #$02
beq $01
iny
lda $7ef374
and #$04
beq $01
iny
RTS
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Puzzledude Thu 3 Apr 2014 - 18:06

These new codes are even more advanced. Great that all this can be done.  Very Happy  And since the 7 crystal barrier can be done this way, it is a lot better, than the previous complex overworld barrier. PS This timer fits perfectly into Gates of Time game (since it has something to do with time 😂 )
Puzzledude
Puzzledude

I need help with my hack :-D Image213

Since : 2012-06-20

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Thu 3 Apr 2014 - 18:42

Cool! :d

I now made this zip file containing all types of countdowns

http://bszelda.zeldalegends.net/stuff/Con/countdown_asm.zip

Inside you will find 5 asm variants:
(1) Need an item to disable countdown (1 entrance)
(2) Need an item to disable countdown, each Crystal you collect increases your time in the dungeon (1 entrance)
(3) Need a specific amount of crystals to disable countdown (1 entrance)
(4) Need a specific amount of crystals to disable countdown (2 entrances with different amounts of crystals)
(5) Need a specific amount of either crystals or Pendants for 2 entrances
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Thu 3 Apr 2014 - 21:33

Just a small Beauty update- if you leave a timed dungeon, you will have the time still on Screen in the overworld for a short time.

I need help with my hack :-D Rom30010

To avoid this, readjust and reapply your asm from here:
http://bszelda.zeldalegends.net/stuff/Con/countdown_asm.zip
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Puzzledude Fri 4 Apr 2014 - 7:09

Nice. By the way since this timer uses the gfx of the floor counter, I want to ask you, if it is possible to disable the floor counter, that poops up, when you go up or down the indoor stairs (or fall into an indoor hole).

In some prototypes, I've blanked out the gfx to avoid this floor counter. But with the timer, this gfx is obviously needed.
Puzzledude
Puzzledude

I need help with my hack :-D Image213

Since : 2012-06-20

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Fri 4 Apr 2014 - 18:11

Difficult... but the timer is displayed to the left of the floor numbers anyway. maybe it doesn't disturb that much? This was actually the reason why I needed to place the timer a bit left of it, the floor numbers get erased frequently.

If you nevertheless want to get rid of it, try this:

05/7d25: a9 1e 25 8F F2 C7 7E 1a 8f 34 c8 7e 1a 8f 32 c8 7e a9 0f 25 8f f4 c7 7e
(all to ea)
05/7d25: ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea ea

and
05/7d7c: b9 e0 fc 9f f2 c7 7e b9 f6 fc 9f 32 c8 7e
(all to ea as well)
05/7d7c: ea ea ea ea ea ea ea ea ea ea ea ea ea ea


Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Puzzledude Sat 5 Apr 2014 - 7:52

This is working  Very Happy  Thank you for this. I tested all: removing counter: first code disables letters B in B1 and F in 1F 2F etc; second part disables numbers. 1 in B1.

The annoing floor counter is finally gone. The counter makes it impossible to (for instance) warp from 1F to 4F, or to fall down a hole from 4F to 2F with one long fall. The "no map" strategy of Parallel Worlds actually goes together with removing the floor counter: making the dungeon "floor acurate" is much more difficult.

You can see that in Goddess of Wisdom in the dungeon with Pegasus shoes: one room has a quarter section on the left-down area to save space. And yet the "floor acurate" dungeon forbids that, since it becomes a floor paradox, when you warp to big chest and then go up the stairs again (with the floor counter removed, this is not a problem).


Also tested Timer + counter: Timer comes just left of the counter. So both can be used normally, I just wanted the floor counter removed for the previous reasons.
Puzzledude
Puzzledude

I need help with my hack :-D Image213

Since : 2012-06-20

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Sat 5 Apr 2014 - 11:28

Seeing this Picture I understand having it erased:

I need help with my hack :-D Rom30011


Therefore I shifted the countdown 1 further to the left (in case you also want to use floor Levels or want to see timer and Counter more separated):
Readjust and reapply your asm from here:
http://bszelda.zeldalegends.net/stuff/Con/countdown_asm.zip

I need help with my hack :-D Rom30012
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

I need help with my hack :-D Empty Re: I need help with my hack :-D

Post by Conn Sat 5 Apr 2014 - 11:50

urgh, you Need to reapply the asm anyway; I found a bug when going up/down the stairs and being warped:

I need help with my hack :-D Rom30013

You can find yourself? If not, reapply the asm Wink



Edit:
I also fixed Swimming (even when having L2 flippers) and being warped.

http://bszelda.zeldalegends.net/stuff/Con/countdown_asm.zip
Conn
Conn

I need help with my hack :-D Image212

Since : 2013-06-30

Back to top Go down

Page 1 of 2 1, 2  Next

Back to top


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