It is currently Mon Oct 23, 2017 1:52 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 11 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: 3064
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: 3192
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 
Online

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6301
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: 3064
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  
 
PostPosted: Sun Jan 22, 2017 6:28 am 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
Sorry.
Bad mood.


Top
 Profile  
 
PostPosted: Mon Feb 13, 2017 10:24 am 
Offline
User avatar

Joined: Fri Nov 19, 2004 7:35 pm
Posts: 3944
It's not so much about NTSC filtering, simulating the weird pixel edges, and getting the cool dot crawl artifacts correct.
It's about how the PPU actually makes a signal, it's a square wave with real voltages, and they get interpreted by TVs as a composite signal. Using the emphasis bits decreases the voltage at specific parts of the wave, and that affects how the solid colors turn out.

So you can either do all the complicated math to turn voltages and square waves into RGB, or rely on someone else who already did the complicated math. If you like, I could extract the 8 Nintendulator NTSC palettes. (I'm a huge Nintendulator palette fanboy here, that palette looks so much nicer than all the other attempts at a TV mode palette)

The problem with multiplying RGB components by a number is that the answer you get is simply wrong.

_________________
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!


Top
 Profile  
 
PostPosted: Mon Feb 13, 2017 2:09 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
THIS is the answer.
http://bisqwit.iki.fi/utils/nespalette.php

Period.


Top
 Profile  
 
PostPosted: Mon Feb 13, 2017 4:03 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10067
Location: Rio de Janeiro - Brazil
Speaking of color emphasis and the wiki, I was looking the other day and couldn't find any information about the colors that aren't affected by color emphasis. If I remember correctly, columns $xE and $xF aren't affected, while everything else is. Is this in the wiki anywhere? I think this is a pretty big deal (apparently there are even emulators that get this wrong), but I'm not sure what the best place for this information would be, if it isn't already there.


Top
 Profile  
 
PostPosted: Mon Feb 13, 2017 4:06 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10067
Location: Rio de Janeiro - Brazil
Zepper wrote:

I wish we had access to the script that generates these palettes.


Top
 Profile  
 
PostPosted: Mon Feb 13, 2017 4:38 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19122
Location: NE Indiana, USA (NTSC)
tokumaru wrote:
Speaking of color emphasis and the wiki, I was looking the other day and couldn't find any information about the colors that aren't affected by color emphasis. If I remember correctly, columns $xE and $xF aren't affected, while everything else is. Is this in the wiki anywhere?

Search the wiki for emphasis.

NTSC video states: "A test performed on NTSC NES shows that while emphasis affects color $1D, it does not affect colors $0E, $0F, $1E, $1F, $2E, $2F, $3E, and $3F." PPU registers used to misleadingly state "all colors" were affected, but I just revised it to state $00-$0D, $10-$1D, $20-$2D, $30-$3D.


Top
 Profile  
 
PostPosted: Mon Feb 13, 2017 5:57 pm 
Offline
Formerly Fx3
User avatar

Joined: Fri Nov 12, 2004 4:59 pm
Posts: 3064
Location: Brazil
tokumaru wrote:
Zepper wrote:

I wish we had access to the script that generates these palettes.

The worst side is someone having a cow about this. :lol: :lol: :lol:


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


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