ROM Hack 4 Digit Hex Colours?

someonewhodied

Lazy Person
Member
Joined
Sep 21, 2008
Messages
871
Reaction score
173
Trophies
1
Age
31
XP
1,286
Country
United States
So megaman zero collection uses 4 digit hex colours instead of the usual 6 and the colour mixer I have doesn't work.

I'm specifically looking for values for AR codes like this:

Weapon Colours (Z3)
92040524 00FF0300
520349E4 BFF28388
E20349E4 0000000C
XXXXYYYY ZZZZ@@@@
####$$$$ 00000000
D2000000 00000000

For the part in red.
 
wouldn't it be easier to add a hold select and up to increase value xxxx and select and down to decrease xxxx value (and then a different button for the rest of the 4 digits). then to document what each increase does?
Seriously I have no intention of figuring it out for you. (that is huge time waster). if you already know which area is the color area and you know its between these hex values turning the above code into a increase / decrease to change color makes sense right? its just setting the interval... (byte jump)
 
If max color is on 2bytes (using 4 hex digit) then it means the max value is FFFF = 1111 1111 1111 1111

if it's RGBA it's 4 bit per color
if it's RGB it's 5 bit per color +1 unused 0 11111 11111 11111 = 01111111 11111111 = 0BBBBBGG GGGRRRRR = 2 bytes. Each byte store a mix of two colors, contrary to 3 bytes with one color per byte)
known as 15-bit color

11111 = 0x1f = full color, but you need to set them to binary to find the correct color.
White is not 0x1f1f1f but 0x7FFF (11111 11111 11111)


PS: it's only a supposition on how the color can be coded in your current game
You'll have to test it to know if it's working, and if it's in big or little endian (the unused bit at the start or the end, and the direction of the color reading)
0RGB
RGB0
0BGR <- more likely to be this one
BGR0
and high chance it's in little endian (reversed order) 0x7FFF must be written FF 7F in your Action replay code.
Read the link above to learn how to convert 24bit to 15bit

Edit:
It could be that it's not using a color definition, but a palette position.
For example you have a palette with 32 positions (I randomly picked that number). each position has it's own color definition, and the sprite use the palette position instead of a color definition for of its each pixel.
 
  • Like
Reactions: rastsan

Site & Scene News

Popular threads in this forum