Register - Login
Views: 99795222
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 05:23:59 AM
Jul - General Game/ROM Hacking - Nintendo 64 color hacking? New poll - New thread - New reply
Next newer thread | Next older thread
Lmodesto
Random nobody
Level: 4


Posts: 1/2
EXP: 198
For next: 81

Since: 11-24-08


Since last post: 13.4 years
Last activity: 13.4 years

Posted on 11-24-08 10:52:40 PM Link | Quote
My apologies, but I can't find any info on this regard and it's driving me nuts.

So, I was messing with the Hi-res texture functions Nintendo 64 emulators have nowadays, just for kicks, trying to change the look of the characters in Super Smash Bros.

I figured, Kirby is the simplest character in that, so I'll start with him.

Well, I've managed to alter his face, but...

Neither his body nor his feet use textures. They're simply flat colors. I've seen the colors for Mario in Mario 64 being altered hundreds of times, so I figured there must be a way to find this info in the rom and replace that color. Thing is, I have no idea where to find it.

Has anyone attempted to change the colors in Smash Bros. models? Is there a tool to help me find where they're located? I've done palette editing in NES, SNES and GBA titles; they all have emulators that let me see the colors and look for them. But with the N64, I can't do that. Anyone have some insight into this?

For the record, the RGB value of Kirby's body color is #F7A5B5 (247, 165, 181). I'm quite sure the N64, like other systems, uses a different system, though. I mean, I've tried searching for the RGB value above in hex, to no avail. Also tried it backwards (B5A5F7), and nothing. So, I'm stumped. I got that color value from Kirby's original face texture, but I don't see why it'd be innacurate. Does anyone know how to make that conversion so I can alter the value in hex?
Joe
Common spammer
๐Ÿฌ
Level: 111


Posts: 605/3392
EXP: 14501067
For next: 367293

Since: 08-02-07

From: Pororoca

Since last post: 12 days
Last activity: 6 hours

Posted on 11-25-08 12:51:53 AM Link | Quote
Most likely, this color is stored in 15 bits. If the color order is red-green-blue, that specific color would be 0x7A96.

How to convert a 24-bit color to 15-bit color:
  1. Drop the last three bits of each color value
  2. Insert a 0 in the first bit
  3. Fill the remaining bits with the 5-bit values for red, green, and blue

In your example, it would be this:

F 7 A 5 B 5
1111 0111 1010 0101 1011 0101

1111 0___ 1010 0___ 1011 0___

0 11110 10100 10110

0111 1010 1001 0110
7 A 9 6

To convert back, split the value back into 5-bit colors and fill the spaces by duplicating the first bits of each color.
Like this:

7 A 9 6
0111 1010 1001 0110

0 11110 10100 10110

1111 0___ 1010 0___ 1011 0___

1111 0111 1010 0101 1011 0101
F 7 A 5 B 5

The colors could easily be in a different order, like blue-green-red, so keep that in mind. Also, some ROMs are byteswapped so you might have to reverse the bytes when you search and replace.

I hope this makes sense.

____________________
ใ€Œใใ‚…ใ†ใ‚Šๅ‘ณใฎใƒ“ใƒผใƒซใ‚’้ฃฒใ‚ใฐใ„ใ„ใ‚ˆ!ใ€
"Wouldn't Cucumber-Flavored Beer Be Nice to Drink!"
ReiNi
ใ•ใ‚ˆใชใ‚‰๏ผŠใธใƒดใƒณ
Level: 124


Posts: 1265/4444
EXP: 21769052
For next: 67549

Since: 07-21-07


Since last post: 6.7 years
Last activity: 3.3 years

Posted on 11-25-08 01:07:01 AM Link | Quote
Every of us has a littlehuge โ‘จ inside.
----------------------------
Well... I don't know how it works in SSB or if this'll be of any help but whatever.

In SM64 the colors in RAM are in RGBA. There's a value for the "solid" color, and other for the "bright".

Guessing from what I got, the red value was followed by the green value of the same category, and the blue with the alpha (which is unused). But I didn't really understood that... There were repeated values too... (People went crazy with this and reposted the code everywhere, so it shouldn't be too hard to find)

Though chances are it's not like that in ROM, much less in SSB

____________________

Lmodesto
Random nobody
Level: 4


Posts: 2/2
EXP: 198
For next: 81

Since: 11-24-08


Since last post: 13.4 years
Last activity: 13.4 years

Posted on 11-25-08 05:30:19 PM Link | Quote
Wow, thanks for the input, you two. Didn't expect a "random nobody" to be answered so soon.

While F7A5B5 didn't bring any results in the rom, 7A96 brings back 133 results! I really don't know how to narrow it down. None of the instances I tried changing made Kirby's body color different.

Trying BGR instead (5A9E), it brings up 75 results.


About byteswapping, I've been told in another forum the Z64 format isn't swapped. My rom is in that format. I'm not sure if this qualifies, however...
Joe
Common spammer
๐Ÿฌ
Level: 111


Posts: 610/3392
EXP: 14501067
For next: 367293

Since: 08-02-07

From: Pororoca

Since last post: 12 days
Last activity: 6 hours

Posted on 11-25-08 11:47:00 PM Link | Quote
Your ROM can be named .Z64, but that doesn't mean it's in Z64 format. Try it anyways.

Or, if you're using Windows, you can use Tool64 to find out what format it's in and change it. (Look here.)

____________________
ใ€Œใใ‚…ใ†ใ‚Šๅ‘ณใฎใƒ“ใƒผใƒซใ‚’้ฃฒใ‚ใฐใ„ใ„ใ‚ˆ!ใ€
"Wouldn't Cucumber-Flavored Beer Be Nice to Drink!"
Next newer thread | Next older thread
Jul - General Game/ROM Hacking - Nintendo 64 color hacking? New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

29 database queries, 2 query cache hits.
Query execution time: 0.094895 seconds
Script execution time: 0.010566 seconds
Total render time: 0.105461 seconds