18 usuários online: Alex No, Angel Miranda,  Anorakun,  BeeKaay, Bullrunfarms, Children's Digest 1950-2009, Connnnair, Dan2point5, DasFueller, E-man38, gemstonezVA, GiraffeKiller, Jern, KimmyWBTVE2022, OEO6, Serge, TCgamerboy2002, The Yak Smoker - Visitantes: 120 - Bots: 153
Usuários: 56.266 (2.260 ativos)
Último usuário: Bullrunfarms

24 bit pointer

So I installed immamelia's Player Palette remap patch thing, and I understood everything except for the part about the 'storing a 24-bit pointer'.
I was thinking that it was like $0D82 in the RAM map, but it says that it is a 16 bit pointer. What is a 24 bit pointer? I remember seeing that it was six digits, but that's all that I remember.
please click this!
A 24-bit pointer is nothing more but a 16-bit pointer except that it also contains the bank. This means, you have got more freedom on picking, which palette Mario or Luigi have got with that patch. SMW limits the palette on bank 00 but with this patch, you can pick the player's palette this from any bank including RAM.

Here is an example on how to set up a 24-bit pointer:
	LDA.b #Table
	STA !Pointer
	LDA.b #Table>>8
	STA !Pointer+1
	LDA.b #Table>>16
	STA !Pointer+2

In addition, you can safily ignore $0D82 as the patch uses a different RAM address for the pointer (that is whatever is entered for "!RAM_PlayerPalPtr" in the patch).
Quick question, what is #Table?
please click this!

#Table is just whatever you want to reference. So in this case, you'd want #Table to be the table containing your player palette.
(it doesn't have to actually be called "Table" btw, that's just a label for it)

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
How do I make this, 'table'?
please click this!

Well, for a palette, it'd just be of the form:
	dw $0000,$1111,$2222,$3333
	dw $4444,$5555,$6666,$7777
	dw $8888,$9999

Where $0000, $1111, etc. are the SNES RGB colors you want to use (with 10 colors in total, for colors 6-F). For details on how to get SNES RGB values, see this post.

But for example, here's how the original Mario/Luigi palettes look:
	dw $635F,$581D,$000A,$391F	; Normal Mario
	dw $44C4,$4E08,$6770,$30B6
	dw $35DF,$03FF

	dw $4F3F,$581D,$1140,$3FE0	; Normal Luigi
	dw $3C07,$7CAE,$7DB3,$2F00
	dw $165F,$03FF

	dw $635F,$581D,$2529,$7FFF	; Fire Mario
	dw $0008,$0017,$001F,$577B
	dw $0DDF,$03FF

	dw $3B1F,$581D,$2529,$7FFF	; Fire Luigi
	dw $1140,$01E0,$02E0,$577B
	dw $0DDF,$03FF

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer
So, I'm not exactly clear on what I'm supposed to do.
What I want is just to run the palette change thing in uberASM. It would be nice if somebody gave me a step-by-step thing, because I'm having issues.
Setting up the #Table with my colors and using MFG's code with the defines set up crashes the game. Would you mind being specific?
please click this!
The problem is that you still took it as a full code despite I have explicitely written that the code above is an example (and also that it primarily focused on setting up 24-bit pointers, not to use a custer player palette). Of course, the code doesn't work. In fact, even without the crash, you still need to set a flag to have the patch activated in-game.

And to make stuff even more complicated, I will not put down a full code for you. Though not because you failed at realising that the code above is an example but rather because we don't know how you want to have this implementated. We don't know, why you want to use the patch as there are many important factors (e.g. is the palette dependant on Mario or Luigi or their powerup?) which may and up factoring the final code.
Wow, what a helpful response
Look, all I want to do is know how to set up the pointer thing. You didn't tell me what to do with that code, so I'm a bit clueless. You say that it sets up the pointer, but I'm not sure what you mean exactly. I don't understand what I need to do with either of those codes.
I also set the flag, too. I also tried putting $00B2F0 into the pointer and it causes random colors instead of Mario's fire flower palette. (which contains the colors I want to use)

To be honest I'm really confused. I understand storing and loading and most of ASM, but I don't understand what to do exactly.
please click this!

It's highly recommended you learn at least basic ASM; it's really not difficult, and this tutorial at least can be completely finished within a couple hours.

Anyway, I'll be nice and give you a basic code:
!RAM_PlayerPalPtr = $7FA034		; if you changed these in imamelia's patch, change here too
!RAM_PalUpdateFlag = $7FA00B

	LDA.b #Palette			; set up pointer
	STA !RAM_PlayerPalPtr
	LDA.b #Palette>>8
	STA !RAM_PlayerPalPtr+1
	LDA.b #Palette>>16
	STA !RAM_PlayerPalPtr+2
	LDA #$01			; mark as active
	STA !RAM_PalUpdateFlag

	dw $635F,$581D,$2529,$7FFF	; Fire Mario
	dw $0008,$0017,$001F,$577B
	dw $0DDF,$03FF

This just sets Mario to use Fire Mario's palette, regardless of his size. If you want to make your own palette, modify the table at the bottom.

Professional frame-by-frame time wizard. YouTube - Twitter - SMW Glitch List - SMW Randomizer