It is currently Sun Jan 22, 2017 1:03 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Color emphasis info??
PostPosted: Sat Jan 21, 2017 3:38 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 2834
Location: Brazil
Does the wiki bring color emphasis info? Is available the % of each component (RGB) when there's color emphasis enabled???

I have a few numbers/info in my emulator, but... no clue where they came from...???
Code:
   int emphasis_table[21] = {
/* 001 Red      */  1239,  915,  743,
/* 010 Green    */   794, 1086,  882,
/* 011 Yellow   */  1019,  980,  653,
/* 100 Blue     */   905, 1026, 1277,
/* 101 Magenta  */  1023,  908,  979,
/* 110 Cyan     */   741,  987, 1001,
/* 111 Black    */   750,  750,  750
   };


Top
 Profile  
 
PostPosted: Sat Jan 21, 2017 4:16 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 3180
Location: Mountain View, CA, USA
https://wiki.nesdev.com/w/index.php/NTS ... _Tint_Bits

Formulas are there, as well as under "Emulating in C++ code". Also, don't overlook the last line of the "Color Tint Bits" section. These formulas look relevant to actual NTSC emulation and not so much "what values should I add to literal R/G/B space". In other words: how to implement this is going to vary from emulator to emulator. Maybe someone can provide formulas for R/G/B methodology.

For a list of games that use these bits: https://wiki.nesdev.com/w/index.php/Col ... asis_games


Top
 Profile  
 
PostPosted: Sat Jan 21, 2017 4:34 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 5193
Location: Seattle
koitsu wrote:
Maybe someone can provide formulas for R/G/B methodology.
Each bit adds nonlinearly, and also most clip in RGB. So: accurate calculation of emphasis colors and brightnesses are really only practical to do via the YIQ or YUV colorspaces.


Top
 Profile  
 
PostPosted: Sat Jan 21, 2017 7:57 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 2834
Location: Brazil
Hmm... Who told you that color emphasis must be inside a NTSC color/video encoder? After all, it's not true that no math can be done in RGB space! I disagree.

The PPU section covering the emphasis bits must bring information about the color emphasis in RGB color space, since it is/was the default for most of the NES emulators. I'm 19 years working on my emulator for a pixel-perfect PPU output in RGB to be called "inaccurate" due to the lack of a NTSC filtering..!?

Quote:
Maybe someone can provide formulas for R/G/B methodology.

EDIT: updated the wiki with % values for each RGB component, including the emphasis effect, like red+green=yellow.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: e-neon and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group