Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
1 user currently in Super Mario World hacking: labmaster | 3 guests
Acmlm's Board - I2 Archive - Super Mario World hacking - lunar magic animated palettes | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
ExKeeper

Bullet Bill
Level: 31

Posts: 76/512
EXP: 180084
For next: 5279

Since: 03-05-05
From: Riiight ^

Since last post: 1 day
Last activity: 6 hours
Posted on 03-26-05 07:14 AM Link | Quote
Is there a way to convert PC RGB values to SNES RGB values?
Shyguy
The Original Femme Fatale!
Level: 57

Posts: 350/1998
EXP: 1443008
For next: 42920

Since: 02-14-05

Since last post: 2 hours
Last activity: 1 hour
Posted on 03-26-05 07:21 AM Link | Quote
Useful Resources for SMW Hackers! (NEWBIES: READ THIS)





Read that thread for your color converting needs!!!!!


(edited by Master M on 03-25-05 10:22 PM)
ExKeeper

Bullet Bill
Level: 31

Posts: 77/512
EXP: 180084
For next: 5279

Since: 03-05-05
From: Riiight ^

Since last post: 1 day
Last activity: 6 hours
Posted on 03-26-05 07:40 AM Link | Quote
the link seems to be dead.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3903/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 03-26-05 11:27 AM Link | Quote
Well, SNES uses 15-bit colour AFAIK. So something like this should work:
S = (B & 31) ^ ((G & 31) << 5) ^ ((R & 31) << 10)
where S = SNES colour. ^ means XOR (you could use add, but XOR is faster ) and << means left-shift (multiply by 2; eg x << 5 means x multiplied by 2 5 times).
Smallhacker

Green Birdo

SMW Hacking Moderator
Level: 68

Posts: 1417/2273
EXP: 2647223
For next: 81577

Since: 03-15-04
From: Söderhamn, Sweden

Since last post: 10 hours
Last activity: 9 hours
Posted on 03-26-05 01:21 PM Link | Quote
A few weeks ago, I was finally un-lasy enough to write a few functions that converts SNES colors to PC and vice versa. Maybe I should make a program out of them and release it?


(edited by Smallhacker on 03-26-05 04:22 AM)
blackhole89

LOLSEALS
Moderator of ROM hacking
EmuNET IRC network admin
Head GM of TwilightRO
Level: 47

Posts: 603/971
EXP: 739208
For next: 26995

Since: 03-15-04
From: Dresden/Germany

Since last post: 14 hours
Last activity: 12 hours
Posted on 03-26-05 01:40 PM Link | Quote
Originally posted by HyperHacker
Well, SNES uses 15-bit colour AFAIK. So something like this should work:
S = (B & 31) ^ ((G & 31) << 5) ^ ((R & 31) << 10)
where S = SNES colour. ^ means XOR (you could use add, but XOR is faster ) and << means left-shift (multiply by 2; eg x << 5 means x multiplied by 2 5 times).

First off, it is the other way around, in other words, the blue colour component is the highest one.
Second, you have to act a little bit different if you want to convert a 24-bit RGB colour to SNES.

S = ((R & 248) >> 3) ^ ((G & 248) << 2) ^ ((R & 248) << 7).

This one should be right.
ExKeeper

Bullet Bill
Level: 31

Posts: 84/512
EXP: 180084
For next: 5279

Since: 03-05-05
From: Riiight ^

Since last post: 1 day
Last activity: 6 hours
Posted on 03-26-05 07:55 PM Link | Quote
I don't understand that equation, but I just figured out that the palette editor will show it.


(edited by smwedit on 03-26-05 12:14 PM)
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3945/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 03-28-05 08:20 AM Link | Quote
Heh, I thought I remembered something about having to use the higher bits of the colour, but I figured that was for converting to RGB. But then I never really worked with SNES either; Gameboy Colour just also happens to use 15-bit RGB.


(edited by HyperHacker on 03-27-05 10:20 PM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Super Mario World hacking - lunar magic animated palettes | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.018 seconds.