Language…
18 users online:  AmperSam, Carnalwillow, crocodileman94, DanMario24YT, EvilAdmiralKivi, h4shcat, Hayashi Neru, Jaiden, JezJitzu, MorrieTheMagpie, quantumcoder,  Segment1Zone2, ShadowMistressYuko, signature_steve, simon.caio,  Tahixham, toady, TonyversoTV - Guests: 260 - Bots: 304
Users: 64,795 (2,378 active)
Latest user: mathew

Making mario flicker?

Well, as the title says, I've found a set of blocks and sprites called Pseudo-Powerups, made by schwa, and inside I found exactly what I needed, a code for making mario run faster under certain conditions.

First of all, is Ok if I use his code, even if I'm not going to release the patch? I couldn't contact him, so...

The thing is, I've already tweaked it, so the condition is being cape mario, and so when mario runs at top speed, enemies can't touch this (lol pun). The code is here.

My main question is: how can I make a patch of this code? Set it to use free ram, make it execute always, all that stuff.

Also I have a simpler (I hope) question: What should I add to this patch, so the Y position of the cape is always the same, the lower two tiles at about mario's shoulders height, like when he falls with cape?


EDIT: please go to last post

Thanks to anyone reading ^.^
I do not believe you'll be breaking the rules of the site unless schwa explicitly stated somewhere he didn't want the patch to be used. (As for how I personally see it... well... I'll hold back my vitriol toward the concept of "creator's rights.")


As for your other questions, it looks to me like it was originally supposed to be put in a generator or levelasm. So just put it in levelasm. (note I didn't actually check if it works or not)

Not sure on the cape question.
Well, if it's a bad idea, then I'll try to use something different.

The thing is, it was a generator, but what I want to make is a completely-separate patch, without levelasm or uberasm, like most on the patches section. How would the basic "skeleton" of such a patch be? (Place code in defined freespace in smw, then make that code execute.)
Well the problem would be determining where to hijack. There are only so many places that would make sense and many are already taken up by stuff like levelasm. Making a standalone patch risks things like conflicts with other patches.

If you're dead set on making it a standalone patch, look at where levelasm did its hijacks and make your own nearby.
Well, then I'll study the code in level asm,and see where can I hijack, or I'll have to surrender and make it an uberasm patch :p Thank you for helping!

EDIT: Well, I made the patch and it ALMOST works:
Code
global_code:
	LDA $19		; \
	CMP #$02	;  | Check if caped, if not, do nothing.
	BNE Return	; /

	LDA $7B		; \ Check the player's X Speed.
	BPL HiSpeed	; /
	EOR #$FF	; | Make the value positive if it isn't (ie if the player is running left).
	INC

	HiSpeed:
	CMP #$2C	; \ If not at max speed, do nothing.
	BCC Return	; /
	LDA #$05	; \ Make Mario invulnerable when moving at new hi-speed.
	STA $1497	; /
	Return:
	RTS


The problem is, mario doesn't flicker when running at top speed, though he IS invulnerable... how can I fix this?