 |
|
 |
|
Views: 236,473,392 Time: 2013-05-23 10:05:26 PM | 12 users online: Doopy Buckride, FlamingRok, HyperMario, Jordohio, Ludus, NEX and GBX, RaindropDry, Ramidalv, Randomiser, RonaldCoLtd, Sokobansolver, ZMann - Guests: 22 - Bots: 12 | Users: 22,874 (1,272 active) Latest: Dev66 |
|
|
 |
|
 |
|
| Tip: Try not to place secret exits at the very end of levels-- the player will basically have to go through the same level twice. |
|
|
|
 |
|
 |
|
 |
|
 |
|
| Exit on death |
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Exit on death |
|
Pages: 1  |
|
|
|
| Posted on 2009-10-21 03:25:07 PM |
Link | Quote |
|
ok so I created an ASM patch that effectively makes it so when you die, you trigger the secret exit. The only problem is, It only works if you run into another sprite, if you fall down a hole, you just die normally. I assume this is because I JSL'd to my new routine from Mario's death routine, which doesn't occur if you fall off an edge. So my question is, what address should I use so it triggers my effects when you fall off the edge? here's my code by the way if it helps anyone understand what I'm saying
Code
!freeSpace = $2080CA
macro RATS_start(id)
db "STAR"
dw RATS_Endcode<id>-RATS_Startcode<id>
dw RATS_Endcode<id>-RATS_Startcode<id>^#$FFFF
RATS_Startcode<id>:
endmacro
macro RATS_end(id)
RATS_Endcode<id>:
endmacro
lorom
header
org $00F606
JSL DeathRoutine
; I assume I would put it here?
org !freeSpace
%RATS_start(0)
DeathRoutine:
LDA #$90
STA $7D ; hacked code.
LDA $01 ;1 = normal exit, 2 = secret exit
TAX
LDA $0DD5
BEQ Skip
Skip:
TXA
STA $13CE ;activate midway point flag
STA $0DD5 ;activate exit point
INC $1DE9 ;
LDA #$0B ;fade
STA $0100 ;to OW (without blur effect)
return:
|
|
| Posted on 2009-10-21 04:21:32 PM |
Link | Quote |
|
The falling off cliff killed routine IS the same as the code that handles the death routine normally, it just JSL's past the code that launches Mario upward. You hijacked the code that handles Mario launching upward, so the code is never run when falling off a cliff, as the game just bypasses it. You have to hijack a part of code that is run after the game sets Mario's Y speed.
Basically, this is the code;
CodeCODE_00F5B2: 22 0A F6 00 JSL.L CODE_00F60A
Return00F5B6: 60 RTS ; Return
The JSL leads to the KillMario routine, but the only problem is the CODE_00F60A. Now, look at the code below;
CodeKillMario: A9 90 LDA.B #$90 ; \ Mario Y speed = #$90
CODE_00F608: 85 7D STA RAM_MarioSpeedY ; /
CODE_00F60A: A9 09 LDA.B #$09 ; \
CODE_00F60C: 8D FB 1D STA.W $1DFB ; / Change music
CODE_00F60A is there, but it's AFTER Mario was supposed to launch upward. You probably should change where you hijack the code from, try looking around all.log for a good spot.
|
|
| Posted on 2009-10-21 04:28:58 PM |
Link | Quote |
|
Ah I see. Thanks a lot.
Okay, so I implemented that and it works, exits me out without killing me, but when I fall off the edge it trips the midway flag but not when I'm hit with another sprite. This isn't really a problem in my hack since I won't have midway points, but its conceptually disturbing... Any ideas why this happens?
|
| Last edited on 2009-10-21 08:30:48 PM by HuFlungDu. |
|
|
Pages: 1  |
|
|
|
|
Forum Index - SMW Hacking - General SMW Hacking Help - ASM & Related Topics - Exit on death |
|
|
 |
|
 |
The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.
Copyright © 2005 - 2013 - SMW Central Legal Information - Link To UsTotal queries: 29
|
|
|
|