PDA

View Full Version : [Tutorial] Advanced Palette Editing Tutorial


Christos
August 27th, 2007, 02:48 AM
Advanced Palette Editing Tutorial

Requirements:
VisualBoy Advance
A Hex Editor
Notepad
Your ROM
A-Colour (http://www.sendspace.com/file/zt6712)

http://i18.tinypic.com/6h3e0yq.png

First, open your ROM with VBA and go to the place where there's something you want to change its colors. Then go to Tools -> Map Viewer.

http://i10.tinypic.com/4otsew0.png

There's 4 backgrounds, 0, 1, 2 and 3. The textbox is in BG0. Choose the colors you want to edit from the textbox and write its RGB down in notepad.
We want to edit the blue colors from the textbox, in notepad we should have:
19 25 31 and 15 23 28

Now go back, and go to Tools -> Palette Viewer.
Look at all the blue colors until you find two blue ones that their RGB numbers match with the ones from the textbox.

http://i13.tinypic.com/5yteec4.png

The blue colors of the textbox are there, so we'll have to search for the whole palette in the hex editor (the one in the red circle). If you just search for the two colors, you may edit something else.

The blue color's value that's selected in this picture is "7F33". To search for the palette in the hex editor, you have to write down the values of all the colors in the palette. But to work, you have to flip the first two digits with the last two digits of each value. For example, "7F33" should be "337F".

When you finish writing all the values down and flipping the first two digits with the last two digits you should have:
000029251F00E003007CFF03E07F1F7C5A67000000009C77FF7F337FEF72FF7F

Now, open your ROM in a hex editor, and search for that as a "hex string".

http://i18.tinypic.com/4qgwkdz.png

The hex editor finds the string at offset "1E66B0". Go to "337F" and "EF72", edit them and save. Now you'll need A-Color (http://www.sendspace.com/file/k9ruwq), find a picture with the colors you want to use, open it in Paint, and choose the colors with the colorpicker. Then go to Colors -> Edit Colors and you'll find the color's RGB numbers.

http://i10.tinypic.com/5yjed76.png

Now open A-Color, put the RGB numbers and select "Give Me My Color!".

http://i9.tinypic.com/52c1lzq.png

Now, flip the first two digits with the last two of the Hex Value, and replace the textbox's blue colors in the hex editor with the two new orange ones.
At the offset "1E66B0", find the two blue colors ("337F" and "EF72") and replace them with "5F13" and "1F2F", the hex values of the two orange colors. Then save. Now open the ROM with VBA.

http://i17.tinypic.com/4m2w6xs.png

BlackRainbow*
August 27th, 2007, 04:46 AM
Nice new tutorial...Really good for hackers who don't know pal. changing

Green Charizard
August 27th, 2007, 05:24 AM
Well done Christos, err, Semele I mean... Nice and simple, it'll help alot of people who can't get their head 'round this.

D-Trogh
August 27th, 2007, 05:29 AM
Pretty basic.. Anyway, I think newbies will more likely use APE now :-\

SerenadeDS
August 27th, 2007, 04:05 PM
Good tutorial Christos. APE is much easier to use however.

Ooka
August 27th, 2007, 04:06 PM
Well isn't this the same thing as the Palette editing in Zel's tutorial, and if not can't it still be done his way?

Christos
August 27th, 2007, 10:01 PM
The way is the same as zel's but there's a few things zel's tutorial doesn't have.

And I'll try and make two ways to continue the tutorial after you get in the middle, continue with a hex editor, or use APE.

Ooka
August 27th, 2007, 10:06 PM
Well, I like that you made this but to my knowledge, can't you edit all the palettes in the game with just the VBA and a hex editor. They have both worked for everything that I have palette edited.

Christos
August 27th, 2007, 10:11 PM
What do you mean? With a hex editor, you can edit any palette, APE's difference is that you can see what the colors are too.

Kasekopf
August 28th, 2007, 02:57 AM
Thanks for the tutorial, I've been having trouble with my palette editing. I only have one question:

What are the offsets of the Palettes for the empty tile palettes in Advance Map? (In the AM block editor, palettes 13, 14, and 15)

The game is Pokemon FireRed. Thanks!

Dr.Razor
August 28th, 2007, 10:41 AM
I've got the same question.
What are the offset of all tile palette in AM?
For Fire Red.
Thank you.

cooley
August 28th, 2007, 12:30 PM
Where do you get A-color, and is Color-2-hex the same?
Thanks.

Christos
August 29th, 2007, 07:07 AM
I've uploaded A-Color, the link is in the first post.

cooley
August 29th, 2007, 08:31 AM
Do you know why When I try to change the Tree Colors in Pokémon FireRed to a Pokémon Diamond Tree Color, It always changes Red,yellow and very Light Green. I have the Correct colors and their offsets if it helps:

0000 F747 5033 471A 6709 - The Colors I want to change
0000 F747 5033 471A 6709 8E31 E818 1F7C 715F 1F3B 1D36 D820 9463 2E53 C846 8336 - The whole Color palette.

I want to Over Write the Green Colors with these colors:
4315 36B1 260B 2987 2147 - But I don't know if I could add Palettes(By the way those colors are From Zel's Tree Tiles, I am not going to use his Tree Tile Just the Color).

Thanks for uploading A-Color.

Christos
August 29th, 2007, 11:13 AM
It should work, but editing the first color of the palette won't do anything.

Dr.Razor
October 27th, 2007, 06:32 AM
Where can i downlaod A-color?

mithsu
October 27th, 2007, 07:15 AM
Nice tut, i really can use this!

Tré
October 31st, 2007, 11:38 PM
nice tutorial
it really helped
me thanx again..

yayzombie
November 8th, 2007, 03:40 PM
Where can I find a-colour? Your last link to wikiupload didn't work.

.hack
November 17th, 2007, 04:40 AM
i guess it helps some people but i just dont see the point in changing the colour around the text

xin
November 27th, 2007, 05:20 PM
what is advance-color... i have APE?

axlefoley
December 4th, 2007, 07:19 PM
I would also like to know where one can get a copy of the program

DarkFear
December 8th, 2007, 12:42 PM
Hmmm... if you change just that scene, will it have effects on all the textboxes? (I don't understand that part, but everything else is great Christos!)

cooley
December 8th, 2007, 06:02 PM
To download it, Click on the Word "A-color" in the requirements.

DarkFear
December 8th, 2007, 06:06 PM
Nope that link doesn't work.

Red
December 9th, 2007, 11:44 AM
Look at all the blue colors until you find two blue ones that their RGB numbers match with the ones from the textbox.If you notice, it tells you which palette it is in the map viewer. It ranges from 0 to 15, in the screenshot it even shows that. (So you don't have to search.)
http://img479.imageshack.us/img479/5406/4otsew0ys6.png
Just edited your screenshot.

Also, if you guys want to edit the palette manually, there is a way. I figured this out about a week ago.

First, you get each color of red, green and blue.
Let's say you wanted to make the RGB of 22,37,103. First, you have to round off to multiples of eight. (Meaning if you divide the number by 8, there will be no decimal/remainder.) So, my new numbers are 24,40,104. They are all multiples of 8.
Now, you need the windows calculator. In Windows XP, it's located Start>All Programs>Accessories>Calculator. Once the calculator is open, you need to change to Scientific view.(View->Scientific)
Next, make sure you have decimal selected("Dec").
Now, first divide each number by 8 and we have the valid numbers we can use. So, with the numbers I had before, this gets me 3,5,13. The numbers only range from 0 to 31. The numbers will show up in the game as multiplied by 8.
Now, convert these numbers to binary, by first typing them when decimal is selected and then clicking, "Bin". You'll get a series of 1's and 0's. If the number you get is less than 5 digits long, you'll need to add zeros to the left of the number so that it is 5 digits long.
For example, '3' converted to binary is '11,' so the number you need is '00011.'
Now, with all three numbers converted, now my values in red, green and blue are 00011,00101,01101. Now, the next thing you need to do is simply reverse the numbers so it is now blue, green, red(instead of red, green blue). So, now I have 01101,00101,00011(13,5,3) of blue, green, red. This is your binary code version of your hex colors.
So, remove the commas and the code is '011010010100011.' Now, type the full 15-digit code into the calculator while in binary("Bin") mode. Then, click "Hex" to convert it to hexadecimal. In my case, I get 34A3 as my hexadecimal code. Now, reverse the bytes and instead of 34A3, you now have A334, this is the code as it would appear in the hex editor. Now the first post tutorial can help you with the rest.
(I think that tool was made simply to help with this step.)

And, also instead of writing down the hex codes for every single palette color, it's easier just to rip the whole thing. First, get the address of the first color in the palette you're editing.
http://img150.imageshack.us/img150/5158/addressyh0.png
Then, open the Memory Viewer(Tools>Memory Viewer in VisualBoyAdvance) and click "Save..." Then, type in this address with a size of 20(Hex for 32) and it will save a .dmp file.
http://img252.imageshack.us/img252/9757/dmpbl5.png
Open the .dmp file with a hex editor and the entire palette is put there for you already. You can simply copy the entire thing and then search for it in the rom to find the palette.

derv1205
December 18th, 2007, 11:33 AM
Nice tutorial, i didn't know this way and i will try it , thanks ^^

EdDi
June 28th, 2008, 11:11 AM
nice one...
Hey CAn Some1 Tell Me how to Play with Gary???
Change the icon Ash to gary??How??

alexk1995
July 30th, 2008, 09:24 AM
Nice new tutorial...Really good for hackers who don't know pal. changing

i guess it helps some people but i just dont see the point in changing the colour around the text

its too bee creative and for me I could really tell the difference

this should given an award cuz it helped me a lottt

Darkrai666
August 1st, 2013, 08:13 AM
I went to >tools But All i saw is Colour Picker Gradient O matic and RGB/GBA COnverter..I cant find the map view

pokemontouroku
August 3rd, 2013, 12:44 AM
Thanks for the tutorial XD
I'm very happy that I can edit Palette.