Tip: Be aware that if you put a coin over a question block, unless you apply this hex edit, it will create an invisible solid block above the ? Block if the block is hit first.
As for the jump sound glitching out even if you change the '#$01' and '$1DFA' to '#$35' and '$1DFC', it's actually because of the '?' next to the '35 Jump.txt' in 'addmusic_sound effects.txt'. Remove that '?' and reapply and you should be good to go. This fix should work with any resource that makes the jump sound.
How to change it that you don't have to hold right or left to stick to the wall. Also that you don't detach if you hit the ground while sliding on the wall.
There is also a small bug in the sound that makes samples go haywire, but MST on KitikuSa's server has deduced that it could be an AMK bug. Just something to keep in mind. I'm not sure how I'd go about fixing that, honestly. I don't even know how to work with AMK's innards lol
change the jump sfx so it doesn't use $1DFA, check amk's sound effect list for the proper ram and value for the new jump sfx
iirc the patch does something like "inc : sta $1DFA" in more than one instance, can't check rn
It could also be like 32x32 player patch nonsense since the gif showed a 32x32 graphic flash for a while but I'm not sure. Again, just something to keep in mind.
Note to ASM folk, this patch seems to have an issue with like... Edges of the screen that are solid, like in Morton's Castle causing bugged graphics on Mario. There is also a small bug in the sound that makes samples go haywire, but MST on KitikuSa's server has deduced that it could be an AMK bug. Just something to keep in mind. I'm not sure how I'd go about fixing that, honestly. I don't even know how to work with AMK's innards lol
Note: this patch disables you from sliding and jumping off the last wall that you have jumped off of (or the last “direction” you jump away from). This is not the case on the other Mario games on the method of preventing the player from gaining height from the same wall by merely relying on a timer that prevents the player from returning back to the wall too soon.
The culprit is the RAM address !flags ($61 by default) stores its data bitwise like this: ----LRlr
r is when you are sliding down a left-facing wall (you hold right on the D-pad), value will be #$01 (#%00000001)
l is when you are sliding down a right-facing wall (you hold left on the D-pad), value will be #$02 (#%00000010)
R is when you jumped off left-facing wall (you jump towards the left), value will be #$04 (#%00000100)
L is when you jumped off right-facing wall (you jump towards the right), value will be #$08 (#%00001000)
After jumping off the wall, the value in RAM defined as !flags remains #$04 or #$08 until the player is on the ground. While the RAM is in this state, the player cannot jump off the wall of the direction he have jumped off of:
If #$04, disable sliding and jumping off a leftwards-facing wall
If #$08, disable sliding and jumping off a rightwards-facing wall
See here (I added comments):
Code
LDA !flags ;\>----LRlrLSR ;|>0----LRlLSR ;|>00----LRAND $77 ;|>Blocked status: SxxMUDLRBNE .return ;/>If result both bits 0 and 1 clear, return (not touching any walls)
LDA $15 ;\Controller: byetUDLR
AND #$03 ;|>000000LR
CMP #$03 ;|\If both L and R pressed, return.
BEQ .return ;//
LDA $15 ;\Return if ((PressingLeft and BlockedLeft being set)||(PressingRight and BlockedRight being set)).
AND $77 ;|
BEQ .return ;/
Delete whats underlined to remove this quirk, or use this Uberasm version instead.
EDIT: Being in the water does not reset the flag. I'll ask the moderators about this.
Changed the hijack and merged into one patch. Tested on pre- and post-3.00 Lunar Magic, with and without SA-1 with no errors observed.
The implementation and physics of the wall kick provided by this patch are very well done, and I frequently use it as a base myself. I kind of wish it had a couple more configurable options, like allowing jumping off the same wall twice, or allowing sliding down a wall even if you can't jump off of it. I'd also like to see the wall jump flags reset if the player falls into water or climbs on something. Even without these extras, though, this patch is well-built and worth considering for any project looking to spice up its movement options.
EDIT: Fixed a small error that crept up right after approval, my mistake. Everything ought to be in order now.
Follow Us On