News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Morph lock

Started by Alisa Orlova, April 19, 2014, 05:37:09 PM

Previous topic - Next topic

Alisa Orlova

Hi once again!
First of all, i want say thanks to all, who answered to my previous questions!
I found two patches, one of them was made by "InsomniaDX" and other one is "squishy_ichigo".  They are called "Morph lock" and "Morph lock edit"
First of them makes a "spring ball" just useless item, because you can't jump in ball form anymore. (After you will passed over special blocks of course)
Second patch "Morph lock edit" doesn't work correct, because you can unmorph simply using jump button.
Is it correct, or i do something wrong? How can I make this scheme?


passarbye

i think you misunderstood how to use the patch..
when you want morph lock to be enabled, you have to use a BTS value of 20 on a block that samus will roll over, and you did this right.
however, you used the BTS value of 10 on the block right after that, which disables the morph lock.
you need to put that BTS 10 value on a different block than the one it's on now, because as samus rolls over both blocks the morph lock enables, then disables as she rolls down to the path you made.

tl;dr, move the BTS 10 block to the exits of both tunnels.

Quietus

Yes, you need to have one of the 10's to the left of your 20, so that if players turn round, they aren't stuck in morph form.  You'll want to do this on each exit / entrance - 10 outside, 20 inside. :^_^:

Alisa Orlova

#3
Thanks guys, but it's just a Print Screen error, my apologies.
I did it right before going to sleep, and i did a mistake only when i made a Print Screen. I read a description, before i make it post, and i know how its BTS work.
Please think once again.

MC Video

Vener

She's right . There is a bug in the squishy's one . I noticed it to him long time ago , but ...

Instead , you shoud use this version :

;The majority code was done by Insom. Major thanks to him for this and Kejardon for notes on RAM
;Code modified by Sadiztyk Fish to allow blocks to work in Fool Air X-ray, rather than solid blocks.
;Fixed check for springball, also added comments so you know what's going on mostly.
;BTS $0C locks the morph, BTS $0D unlocks it.


;BTS 0C locks the morphing, BTS 0D unlocks it

lorom

org $809465
JSR $CD90

org $80CD90
LDA $09A1 ;LDA equipped items
BMI $04 ;Branch if items are equipped
LDA $4218 ;LDA value from previous code (before the JSR)
RTS
LDA $0998 ;LDA game state (so you can use UP or JUMP while paused)
CMP #$0008 ;This just checks to see if you're paused or playing, etc
BEQ $1C
CMP #$000C
BEQ $17
CMP #$0012
BEQ $12
CMP #$001A
BNE $09
LDA $09A1 ;If game is paused, LDA equipped items
AND #$7FFF ;Remove high bit, allowing you to use UP/JUMP
STA $09A1 ;Store new value
LDA $4218 ;LDA value from previous code (before the JSR)
RTS
LDA $09A2 ;LDA Equipped items
AND #$0002 ;Checks for Springball bit
BNE $0B
LDA #$FFFF ;If Springball comes positive, LDA 1111 1111
EOR $09B4 ;Reset jump bit if positive. Complement of Jump bit
AND $4218 ;For some reason, ANDing with the previous routine's loaded value.
BRA $03
LDA $4218 ;If Springball comes negative, LDA value from previous code (before the JSR)
AND #$F7FF ;Reset a bit
RTS

org $9498C4
DW $B200 ;BTS 0C (lock)
DW $B20A ;BTS $0D (unlock)

org $94B200 ;Sets up the BTS blocks
LDA $09A1
ORA #$8000
STA $09A1
RTS
LDA $09A1
AND #$7FFF
STA $09A1
RTS


Have fun :)

Alisa Orlova

Thanks you! Now, its works well! I like you now. :razz: