spike floor damage

Page 1 of 2 1, 2  Next

Go down

spike floor damage Empty spike floor damage

Post by wizzrobemaster on Tue 26 Dec 2017 - 9:41

Where is the hex address for spiked floor damage?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

The author of this message was banned from the forum - See the message

spike floor damage Empty Re: spike floor damage

Post by Erockbrox on Tue 26 Dec 2017 - 15:58

the hex address is 0x00524R2D2
Erockbrox
Erockbrox

spike floor damage Image214

Since : 2013-02-05

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by Conn on Tue 26 Dec 2017 - 16:13

It's in the Rom Smile

Open Mon's sram log, look where your health is stored, make a trace in Geiger while walking into spikes and trace back where health (7ef36d) is written to and trace back to rom data.


$36D. Actual Health. Same as above, but this reflects
your current health status rather than potential.


Last edited by Conn on Tue 26 Dec 2017 - 17:25; edited 1 time in total
Conn
Conn

spike floor damage Image212

Since : 2013-06-30

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by SunGodPortal on Tue 26 Dec 2017 - 17:15

Puzzledude wrote:
wizzrobemaster wrote:Where is the hex address for spiked floor damage?  
I suggest you do something on your own, rather than to drop a one-line question for each and every small edit you want to make.

I second this notion. It's like you're not even trying most of the time.
SunGodPortal
SunGodPortal

spike floor damage Image213

Since : 2015-01-26

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster on Tue 26 Dec 2017 - 18:51

The compendium could use an update. Anyway, is Geiger how you usually find hex codes?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

The author of this message was banned from the forum - See the message

The author of this message was banned from the forum - See the message

spike floor damage Empty Re: spike floor damage

Post by Conn on Tue 26 Dec 2017 - 21:13

You simply need to trace backwards:

Code:

$07/80C6 AF 6D F3 7E LDA $7EF36D[$7E:F36D]   A:FFA6 X:0000 Y:0007
$07/80CA 38          SEC                     A:FF98 X:0000 Y:0007
$07/80CB E5 00       SBC $00    [$00:0000]   A:FF98 X:0000 Y:0007
$07/80CD C9 00       CMP #$00                A:FF90 X:0000 Y:0007
$07/80CF F0 04       BEQ $04    [$80D5]      A:FF90 X:0000 Y:0007
$07/80D1 C9 A8       CMP #$A8                A:FF90 X:0000 Y:0007
$07/80D3 90 22       BCC $22    [$80F7]      A:FF90 X:0000 Y:0007
$07/80F7 8F 6D F3 7E STA $7EF36D[$7E:F36D]  
As you can see it loads your current health with
LDA $7EF36D
then it substracts
SBC $00
And THEN stores it to $7ef36d
means the value at $00 (which holds the 08), look in A: - it has 98-08=90
so look further up where 08 get stored to $00

Code:
$07/8096 AD 73 03    LDA $0373  [$07:0373]   A:1700 X:0000 Y:0007
$07/8099 85 00       STA $00   [$00:0000]   A:1708
So value $0373 has 08 (you see it in A:xx08, that is stored to $00 which eventually is substracted from $7EF36D
Now let's look further up for sta $0373:

Code:
$07/D242 B9 6C D0    LDA $D06C,y[$07:D06E]   A:0002 X:00FF Y:0002 D:0000 DB:07
$07/D245 8D 73 03    STA $0373  [$07:0373]   A:0008
and voila, it is loaded from 07D06C+y=07D06c+02=07d06e:
damage through floor spikes can be found at 07:D06E,
which is pc: 03/D06E. Here you should find the 08. When giving it a 00, floor spikes will have zero damage.

It might be confusing if you make it the first time, but it is really easy.

note:You need to be careful if it is sbc $00 or sbc #$00.
Without #, the content of the adress is referred, ram 7e0000 in this case which has the value #$08. If it is with #, the value is adressed, like sbc #$08 -then directly 08 is substracted...
But I think it will make you also invulnerable to other enemies with boots, since this is a main health substracting code.


Last edited by Conn on Wed 27 Dec 2017 - 14:40; edited 1 time in total
Conn
Conn

spike floor damage Image212

Since : 2013-06-30

Back to top Go down

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster on Tue 26 Dec 2017 - 23:50

There were 3 values of 08, but it turns out it is 03/D06D. I set the value to 04.

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

The author of this message was banned from the forum - See the message

The author of this message was banned from the forum - See the message

spike floor damage Empty Re: spike floor damage

Post by Conn on Wed 27 Dec 2017 - 7:52

I think this depends on where or from which direction you walk into the spike floors, I was in turtle rock and walked in from right to left.
To be on the safe side you definitiely should alter all 3 bytes.
Conn
Conn

spike floor damage Image212

Since : 2013-06-30

Back to top Go down

The author of this message was banned from the forum - See the message

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster on Wed 27 Dec 2017 - 9:34

I was testing all directions and so far he is taking half a heart.


wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

The author of this message was banned from the forum - See the message

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster on Wed 27 Dec 2017 - 10:04

Conn, how did you manage to code the lucky shield to bypass spike blocks?

Anyway, PD, what I was thinking is that could the iron shoes give total protection if you change the values to 00?

also when i see the value is at 07, do I subtract the digit's value by 4?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

The author of this message was banned from the forum - See the message

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster on Wed 27 Dec 2017 - 10:15

what about changing instant death to 2 hearts taken? Does the same problem occur?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

The author of this message was banned from the forum - See the message

The author of this message was banned from the forum - See the message

spike floor damage Empty Re: spike floor damage

Post by wizzrobemaster on Wed 27 Dec 2017 - 10:35

I like the idea of having the armor 3 giving immunity to spike block immunity. the cactus share the same properties as the spikes right?

wizzrobemaster
Ganon
Ganon

Since : 2015-01-04

Back to top Go down

The author of this message was banned from the forum - See the message

spike floor damage Empty Re: spike floor damage

Post by Conn on Wed 27 Dec 2017 - 14:26

The lucky by-pass was major asm, no easy reproducable by beginners.


No, it will just become bugged! Imagine you have 1 heart and step on spikes, which will subtract 2 hearts. The game has no -1 heart value, so it will bug-out your health. You can only subtract half a heart or one heart. For instance if you have 3 hearts and reduce 5 hearts on spikes (thus 08 08 08 is now 28 28 28), the game might bring your health to +18 hearts, since it doesn't know the value -2. Same goes if you want to have beyond 20 heart containers.
I think you can go below 00, imagine you have a half heart (04) and 08 is substracted, then you die
Code:
$07/80D1 C9 A8       CMP #$A8                A:FF90 X:0000 Y:0007
$07/80D3 90 22       BCC $22    [$80F7]      A:FF90 X:0000 Y:0007
$07/80F7 8F 6D F3 7E STA $7EF36D[$7E:F36D]
The maximum hearts is A0, which is compared here by A8. BCC means branch on carry clear (<=). So if the value after substract is inbetween A8 and FF (00-08=F8 for example) you should die due to the bcc comparison. Not sure, no time to test.

This was my goal, but unfortunately this doesn't work. When you change those 3 bytes to 00, then you are invincible on spikes, even if no iron shoes. But you can change the bytes to 01, then you are alsmost invincible, since you can take 4 hits on spikes for just half a heart reduction.

Your code surely will bug, it is a main health substracting routine, when normal enemies hit you with boots on, you should be invulnerable as well.

Code:

To make it specific you must hook here:
$07/D242 B9 6C D0    LDA $D06C,y[$07:D06E]  
$07/D245 8D 73 03    STA $0373  [$07:0373]  

so:
03D242:
22 00 80 24 EA EA

at
120000, you need to repeat the deleted code
B9 6C D0    LDA $D06C,y
8D 73 03    STA $0373  
C0 00 cpy #$00  ; and compare to the y-values for floor damage
F0 09 BEQ no damage
C0 01 cpy #$01
F0 05 BEQ no damage
C0 02 cpy #$02
F0  01 BEQ no damage
6B RTL
AF 55 F3 7E LDA $7ef355
C9 01 cmp #$01 Now compare to the boots
D0 03 BNE #$03
9c 73 03 STZ $0373 ; if boots, store no damage to 0373
6B RTL
Conn
Conn

spike floor damage Image212

Since : 2013-06-30

Back to top Go down

The author of this message was banned from the forum - See the message

Page 1 of 2 1, 2  Next

Back to top


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