File Name: | Powerup Auto-kill and Traditional Hurt |
Submitted: | by betalogic |
Authors: | betalogic |
Tool: | Asar |
Requires Free Space: | Yes |
Bug Fix: | No |
Featured: | No |
Description: | This patch can use up to 3 addresses of free RAM, so make sure they are actually free in your ROM if you choose to use them! This patch provides two main features that affect the hurt routine, both which can be set to be controlled by free RAM: 1. The ability to choose to bypass the power-down routine and instantly kill Mario regardless of his current power-up status. (This is good for levels that require the player to keep a power-up the entire time.) 2. The ability to choose to follow the more traditional power-down routine, where Fire and Caped Mario powers-down to big Mario and then to small Mario. There is an additional option to alternatively give Mario the item in his item box instantly; this can also be set to be controlled by free RAM. If you have any other features of a similar genre to these (i.e. slight modifications to the hurt/kill routine), feel free to suggest them. |
Screenshots: |
Code
org $00F5F3 ; If you change your mind at some point, this restores the original code db $A0,$04 ; LDY.B #$04 db $8C,$F9,$1D ; STY.W $1DF9
You do this all the time when you intend to restore the old code. The question is, why don't you write the actual opcodes instead? The way it is, your patch got more difficult to convert into SA-1 because of you coding hex-style in these instances.
The main reason I'm removing this: these pieces of code.
Code
elseif !doAutoKill == 2 org $00F5F3 NOP #5 org $00F5F3 autoclean JML AutoKillMain endif ... if !doTraditionalHurt != 0 org $00F5F8 NOP #4 org $00F5F8 autoclean JML TradHurtMain else org $00F5F8 ; Restores original code db $22,$08,$80,$02 ; JSL $028008 endif
Unnecessary duplicate. Also:
Code
if !autoDrop != 1 && !doTraditionalHurt != 0 if !doTraditionalHurt == 1 && !autoDrop == 0 org $01C545 ; Modifies the touch power-up routine NOP #3 org $01C548 ; Restores original code db $A9,$0B ; LDA #$0B elseif !doTraditionalHurt == 2 || !autoDrop == 2 org $01C545 ; Modifies the touch power-up routine NOP #5 org $01C545 autoclean JML TradHurt_PUMod endif endif
the second conditional was already taken in account by the earlier removal reason I said. But let's look at the first condition. Couldn't you rewrite the piece of code above to this?
Code
if !autoDrop != 1 && !doTraditionalHurt != 0 if !doTraditionalHurt == 1 && !autoDrop == 0 org $01C545 ; Modifies the touch power-up routine NOP #3 LDA #$0B elseif !doTraditionalHurt == 2 || !autoDrop == 2 org $01C545 autoclean JML TradHurt_PUMod NOP endif endif
Last but not least: I'm a bit confused in how to set up your patch; I settled, for instance, for a test in order to get the smb3 powerdown. So, my defines are as follows (take note I've got the time to convert your freeRAMs to SA1 hybrid mode):
Code
!doAutoKill = 2 !doTraditionalHurt = 0 !autoDrop = 2 !FR_AutoKill = $0F42|!addr ; \ Set these to any open empty RAM !FR_TraditionalHurt = $0F43|!addr ; | if used !FR_AutoDrop = $0F44|!addr ; /
But when I applied the patch... nothing changed at all. Also, I didn't even test on a SA-1 ROM as your code didn't have all the address converted... the result is clear as a day.
Your patch seems promising, with a good range of applications in the hands of a skilled hacker. But the thing is, make sure it is well written and actually works in SA-1 roms if you state as such. Good luck next time; I hope the next time you submit this, it meets the standards.