Language…
8 users online: Brian94, crm0622, Green, HengShao, Josuke Yoshikage, Rykon-V73, Sweetdude, xhsdf - Guests: 105 - Bots: 270
Users: 64,667 (2,405 active)
Latest user: DarthHylian

UberASM Gamemode Help

Hello.

https://www.smwcentral.net/?p=section&a=details&id=4189

I am trying to convert this Xkas Patch into gamemode asm for UberASM.
I have done this with other patches but I really don't know what to change with this one to make it work.

Any help would be appreciated :)
Here, this should work:

Code
!freeram = $0660 ;Way overused Free Ram. if your having a problem with the patch, this is
!freeram2 = $0661 ;the first place you should look

main:
	LDA $7B			;\Check if you're moving
	BEQ return		;/
	LDA $1470		;\Check if you're carrying something
	BNE return		;/
	LDA $73			;\check if you're ducking
	BEQ return		;/
	LDA $77			;\ as always, Check if your in the air
	AND #$04		;|	
	BEQ return		;/
	LDA $1490
	BNE skip
	LDA #$03		;\Make Star Powered
	STA $1490		;/
	LDA #$12		;\Set timer for pallete to stop setting
	STA !freeram	;/(without this it blinks after you stop sliding...)
	LDA $18D2
	BEQ skip
	STZ $18D2
skip:
	LDA #$1C		;\Set pose (currently sliding down hill pose)
	STA $13E0		;/
return:
	LDA !freeram	;Check free ram
	BEQ RealReturn
	DEC !freeram	;Decrease free ram
	LDA $0DB3		;\Check which player is playing
	BNE Luigi		;/
	LDA $19
	CMP #$03
	BEQ MFire
	REP #$20		;enter 16 bit mode
	LDA #$B2C8		;\load mario's palette
	STA $0D82		;/and store marios palette
	SEP #$20		;return to 8 bit mode
	BRA RealReturn
MFire:
	REP #$20		;enter 16 bit mode
	LDA #$B2F0		;\load mario's palette
	STA $0D82		;/and store marios palette
	SEP #$20		;return to 8 bit mode
	BRA RealReturn
Luigi:
	LDA $19
	CMP #$03
	BEQ LFire
	REP #$20		;enter 16 bit mode
	LDA #$B2DC		;\load Luigi's palette
	STA $0D82		;/and store it
	SEP #$20		;return to 8 bit mode
	BRA RealReturn
LFire:
	REP #$20		;enter 16 bit mode
	LDA #$B304		;\load mario's palette
	STA $0D82		;/and store marios palette
	SEP #$20		;return to 8 bit mode
RealReturn:
	RTL
Most patches that run every frame that doesn't replace a game mechanic can easily be converted to uberasm by simply copying the main code and removing the "restore code".
Give thanks to RPG hacker for working on Asar.