PDA

View Full Version : [Tutorial]How To Recolor Your XMB Font & Option Bar Using a Hex Editor


Oyabun
03-19-2008, 11:29 PM
Here's an easy to follow tutorial that will allow you to recolor your XMB font and option bar for 3.90 M33 using a Hex Editor.

Even if you have little to no experience hex editing, I designed this tutorial to make it as easy as possible for you to recolor your XMB font and option bar on your PSP.

_________________________________________________________________ _______________________________________________________

Tools you will need:

1. A Hex Editor !

In this tutorial I will be using Hex Workshop. Note that Hex Workshop is not free.

Free Hex Editors can be found ---> Here (http://en.wikibooks.org/wiki/Reverse_Engineering/Hex_Editors#Windows_Hex_Editors)

I would personally recommend either HxD (http://www.freewarezoom.com/archives/hxd) or XVI32 (http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm)


2. A decompressed/decrypted 3.90 vshmain.prx:

----> 3.90 vshmain.prx (http://www.mediafire.com/?xxvp0dyypcy)


If you're using a custom theme with a compressed vshmain.prx and you want to recolor your font & option bar, use PRX compressor 0.41 and the header i supplied to decompress vshmain.prx so you can edit it:

---> PRX Compressor & 3.90 Header (http://www.mediafire.com/?www93lsvy2x)

_________________________________________________________________ _______________________________________________________

On To the Tutorial !


Step 1. Getting RGB Values.

Colors are made up of 3 sets of RGB numbers representing the amount of Red, Green and Blue contained within a color.

A color in the RGB color model is described by indicating how much of each of the red, green, and blue is included. The color is expressed as an RGB triplet (r,g,b), each component of which can vary from 0 to a defined maximum value of 255. If all the components are at 0 the result is black; if all are at 255, the result is the brightest representable white.

I'm sure most of you know how to obtain RGB values. Any image editing program will show RGB values for your selected color.

You can also use a color wheel to get RGB values for a particular color you want to use.


To make it easier for you, here's a Wiki link that provides a List of Colors, and each color's RGB values:

---> Wiki List Of Colors (http://en.wikipedia.org/wiki/List_of_colors)



_________________________________________________________________ _______________________________________________________

I'll be using the color "Pale Blue" as an example.

http://img81.imageshack.us/img81/231/67029326gt8.jpg

Notice the different RGB values for Pale Blue:

Red= 175 Green= 238 Blue= 238


Important Note:


When we input these values into vshmain.prx, we will be inputting them as floating point numbers. Floating point numbers allow the use of decimal points.


In order to input the correct floating point numbers, you must change the RGB values into 4 byte values.

The maximum color channel strength is 1.

If you input any number greater than 1, It will just look like you just changed it to 1, regardless of the value you enter.


In order to get the correct color channel strength values, simply divide each value by 255:

Red= 175 Green= 238 Blue= 238

After dividing each value by 255:


Red= 0.686 Green= 0.933 Blue= 0.933



These values will be inputted as floating point numbers at specific offsets in vshmain.prx.



An offset is basically a location, or position in a file, in this case, vshmain.prx.

_________________________________________________________________ _______________________________________________________


The Color Offset Locations In vshmain.prx 3.90


These offsets will change with the release of a new custom firmware. These are for 3.90 only. I will update this tutorial with new offsets when i find them when a new custom firmware version is released.

http://img183.imageshack.us/img183/2977/fontoffsettf4.jpg

http://img204.imageshack.us/img204/9673/optionmenuoffsetqy8.jpg


Note there a total of 72 offsets.

All of the months follow the same offset pattern. Of course you don't have to change every float. If you just want to change one month to "Pale Blue", you can just change the values for the month of January, Or you can change everyone of them to any color you want.

Lets start with the offsets (locations) for the font color, the month of January:

0x41298 is the offset location for Red
0x4129C is the offset location for Green
0x412A0 is the offset location for Blue


Open your decrypted/decompressed vshmain.prx in your hex editor.


In the left column, you will see the offset list.


I'm going to scroll down to offset 41290.


Now use your mouse to move the cursor to select the byte where the float starts, just in front of 0000 on the 41290 offset line.


This is offset 41298


If you look in the pane directly below the offset pane, you will see the data inspector.

In the data inspector, you can see that i'm at offset 41298

http://img145.imageshack.us/img145/672/offsetwo0.jpg

Now refer to the RGB color channel strengths for Pale Blue:

Red= 0.686 Green= 0.933 Blue= 0.933

Looking at your RGB values for Pale Blue, we want to change the float to the Red value, 0.686:

http://img228.imageshack.us/img228/3954/redgo0.jpg


Now you want to do them same thing for the Green value. Referring to the offset font list, notice 4129C is the offset for green color channel strength for the month of January. On the same offset line, move the mouse cursor over just in front of 17D9 and change the 32 bit float to 0.933:

http://img181.imageshack.us/img181/1461/greenii1.jpg


And finally color channel strengths for Blue for the month of January. Go to offset 412A0, and change the 32 bit float to 0.933:

Offset 412A0 is on the next offset line, directly below 41290


Just move the cursor directly in front of 0000 on offset line 412A0:


http://img145.imageshack.us/img145/9382/bluemi6.jpg

Now flash your vshmain.prx to see the changes:


http://img72.imageshack.us/img72/1554/screenshot003sw0.png


Follow the exact same procedure for every other month for the font offsets, and for the infobar offsets.

If you prefer different color fonts and option bars for each month, just remember to divide your RGB values by 255 to get the correct floating point values.

With a little practice you'll be able to change all of the offsets in no time at all.

mattrey94
03-20-2008, 05:57 AM
Good job robs1968,
I've been whating to know how to do this. Gonna go try it now.

osnap1584
03-20-2008, 07:11 PM
thanks robs Im gonna try this now.

xxxScorpion
05-25-2008, 07:05 PM
Where is the data inspector on HxD?

Oyabun
05-25-2008, 08:41 PM
Where is the data inspector on HxD?
It's supposed to be implemented into 1.8

No release yet :/


Use XVI32.

xxxScorpion
05-26-2008, 12:24 AM
Yea I downloaded it also but it looks a tad confusing.

Not as straight forward as HxD.

Oyabun
05-26-2008, 12:30 AM
Download Hex Workshop 5.0.2

http://www.softpedia.com/get/Programming/File-Editors/Hex-Workshop.shtml

It's a 30 day full trial.

xxxScorpion
05-26-2008, 01:02 AM
How do I go about compressing the prx?

Oyabun
05-26-2008, 01:44 AM
How do I go about compressing the prx?
---> PRX Compressor (http://www.mediafire.com/?junmnp3acdd)

xxxScorpion
05-26-2008, 01:55 AM
No readme eh?

Oyabun
05-26-2008, 02:01 AM
No readme eh?
Run the prxrecomp03x.exe

Select a file for header data (390header.prx included)

Select your decrypted prx and compress.

Make sure the .prx you want to compress is in the same folder.

xxxScorpion
05-26-2008, 02:03 AM
Yea I thought so...

Hmm, Im getting an error of some kind.

--Also I used the prx you supplied.

Oyabun
05-26-2008, 02:06 AM
Yea I thought so...

Hmm, Im getting an error of some kind.

--Also I used the prx you supplied.
What error are you getting?

Try putting the whole compressor folder in C:\Compressor and run it.

xxxScorpion
05-26-2008, 02:13 AM
The move to C Drive fixed it.

Flashing now...

Edit- Ah it worked!

Except there are a large amount of texts still white which I assume is what the options offsets are for.

Great Job.

I would throw in the Compressor and C Drive info into the first post though eh so these questions might not pop up again.

Oyabun
05-26-2008, 02:23 AM
The move to C Drive fixed it.

Flashing now...

Edit- Ah it worked!

Except there are a large amount of texts still white which I assume is what the options offsets are for.

Great Job.

I would throw in the Compressor and C Drive info into the first post though eh so these questions might not pop up again.
The option bar offsets are for recoloring the option bar only:

http://img442.imageshack.us/img442/3856/screenshot02011kp0.jpg

For submenu font and line color, you'll need to change a float in paf.prx.

Anything other than greyscale will cause glitches in the XMB, so you'll want to keep the value between 0 and 1.


0x1A31A8 1 Submenu Font And Line Color


If you want to change the text color of the 6 main xmb icons, just remove the text data for the 6 main xmb icons from topmenu_plugin.rco, and extract the 6 main xmb icon bmps from topmenu_icon.rco and just add the text and font color of your choice to each image and inject them.

Oyabun
06-23-2008, 06:47 PM
4.00 vshmain.prx font and option bar offsets:

http://img115.imageshack.us/img115/4790/fontoffsetms9.jpg

http://img379.imageshack.us/img379/2570/optionbarbc4.jpg

osnap1584
06-23-2008, 06:54 PM
awesome hope bh updates his vshmain editor.

Aaron*1
02-07-2009, 05:10 PM
I assume, to do this with 5.00, I need the vshmain from 5.00?
Thanks in advance. Also, great guide.

EDIT: I can't seem to find the offset: 41290 on either 5.00 vshmain or 3.90 vshmain :\

BTW, I have no previous experience at HEX editing...

EDIT2: Here I took a screenshot to show you what I mean...

http://i233.photobucket.com/albums/ee123/cloudintheskies/vshmain.png

That's 3.90 vshmain.prx

Aaron*1
02-13-2009, 09:10 PM
Sorry for the double post but can anyone help?

Nothingface420
02-13-2009, 10:14 PM
I assume, to do this with 5.00, I need the vshmain from 5.00?
Thanks in advance. Also, great guide.

EDIT: I can't seem to find the offset: 41290 on either 5.00 vshmain or 3.90 vshmain :\

BTW, I have no previous experience at HEX editing...

EDIT2: Here I took a screenshot to show you what I mean...

http://i233.photobucket.com/albums/ee123/cloudintheskies/vshmain.png

That's 3.90 vshmain.prx

The offsets are not the same in 5.00

also there is a easier way to change font/option menu colors
use highboy's vshmain editior http://www.psp-hacks.com/forums/f134/vshmain-editor-v2-5-t233924/

all you need is a decrypted vshmain.prx for 5.00
get that here http://endlessparadigm.com/forum/showthread.php?tid=4142

Aaron*1
02-14-2009, 05:31 AM
Okay, thanks for the help. I just wanted to know whether I could do it through hex editing.

Oyabun
02-14-2009, 11:10 AM
Okay, thanks for the help. I just wanted to know whether I could do it through hex editing.


You can, it's just takes a lot of time. A whole lot of time.

Aaron*1
02-14-2009, 12:11 PM
Lol... Okay... I'll go without.

BTW, I'd +Rep but I have to spread it around.

Organized_Chaos
12-29-2009, 12:22 AM
2. A decompressed/decrypted 3.90 vshmain.prx:

----> 3.90 vshmain.prx (http://www.mediafire.com/?xxvp0dyypcy)
Where can I get one for my PSP? 5.50 GEN-D3 firmware. I assume the 3.90 won't work for me.

Oyabun
12-29-2009, 02:38 AM
Where can I get one for my PSP? 5.50 GEN-D3 firmware. I assume the 3.90 won't work for me.



http://www.sendspace.com/file/rvq869


If you want to use an app instead of hex editing:


http://endlessparadigm.com/forum/showthread.php?tid=15825

Organized_Chaos
12-29-2009, 03:16 AM
I can't get the app to work.

http://img504.imageshack.us/img504/4909/vshmaineditorv3.png

It does this as soon as I run the app.