It is currently Fri Oct 20, 2017 9:11 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 150 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10
Author Message
 Post subject:
PostPosted: Tue Nov 29, 2011 8:09 am 
Offline
User avatar

Joined: Sat Jan 22, 2005 8:51 am
Posts: 427
Location: Chicago, IL
*Spitfire_NES* wrote:
thank you james. and great work on nemulator. :)

thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 27, 2012 5:28 am 
Offline
User avatar

Joined: Fri Oct 14, 2011 1:09 am
Posts: 248
Related link, interesting reading: http://hitmen.c02.at/temp/palstuff/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2012 6:34 pm 
Offline

Joined: Tue Jan 31, 2012 6:14 pm
Posts: 14
As I have been heavily working on "lo-fi'ing" graphics in the last months, I want to share some results with you (as it was nesdev which has inspired me a lot).
First some informations about my current algorithm (general):
I'm emulating a TV screen using a virtual composite signal, real demodulation, some glow and a little bit of pixel grid (composite is unbiased). The virtual TV gets rendered at 752x240, "scanlined" to 752x720 and stretched to 960x720.

How does this fit here? Well, after reading about how the NES generates it's colors I did a quick hack which should resemble the way, the NES works:
- chroma information is a pure square wave (50% duty) which gets phase shifted dependent on which hue is to be produced (period is 12 cycles). Now I generate 13 x 14 boxes of 16x16 pixels each, shifting the hue phase from left to right (last box is zero hue) and increasing the luma from top to bottom. Each pixel is 8 clock cycles.
Dot crawl is also correctly emulated (4 clocks per line). This composite signal is then correctly downsampled and fed into my NTSCTv. The final image gets 2.2 gamma corrected and voila, it works ;)

Two things about NES NTSC:
1. The 'sawtooth' pattern only affects chroma, luma is untouched.
2. The rainbow effect on checkerboard patterns (even without chroma) is an artifact of pixel mixing (a NES pixel is 2.6667 NTSC 'clocks' (4x3.5MHz)) and of course aliasing

I will have to implement this into an existing NES emu to see how it works in realtime :D

The images won't have the correct saturation, as I don't adapt to real NES signal levels, but as the TV emu supports brightness, contrast, saturation and color controls this should not be a problem.

Anyways, here are two images. The first is a 'snapshot' of a crawl phase (a single frame), the second is 'field mixed', i.e. all three crawl phases are mixed into one frame:

http://dl.dropbox.com/u/11133993/pal2.png
http://dl.dropbox.com/u/11133993/pal1.png

The effect also looks nice as a postprocessing step on RGB NES screenshots, but I will have to get my hands on some 'real' NES screenshots (NES color per pixel) to try it out.

Edit: The 'snapshot' image shows some heavy dot-crawling and luma-chroma crosstalk because of a heavily opened luma filter. I turned it up for some testings and forgot to reduce it again^^

Another edit: Here's an image of a 'correct' checkerboard (single frame snapshot):
http://dl.dropbox.com/u/11133993/checkerboard.png

Edit again: Here are some hacked NES screenshots. The images get converted to native NES colors and then composited. All images are 'field merged'. The colors are created in a very naive way: level/3.f is luma, chroma wave is just -1, 1 ... still looks neat I think.
http://dl.dropbox.com/u/11133993/gradius.png
http://dl.dropbox.com/u/11133993/zelda.png
http://dl.dropbox.com/u/11133993/mario.png
http://dl.dropbox.com/u/11133993/iceclimber.png

Here we go again (another edit):
After checking out how the NES PPU really works I figured out that it doesn't use 3 crawl phases but only 2 (scanline 20), so there's just 0 and 120 degree color carrier shifts. (It still has a 3 line crawl pattern) Knowing this I changed my algorithm to merge just 2 fields and use correct NES colors. Here are two Castlevania shots:

http://dl.dropbox.com/u/11133993/castle2.png
http://dl.dropbox.com/u/11133993/castle3.png

I hope this was the last edit (don't want to double post^^).

And: I'm the new one, greetings from a retro gaming lover :D


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 31, 2012 9:33 am 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2287
Sorry to bump up this thread, but I have a question about the color palette.

I'm trying several different formulas, but the color at 120 degrees always comes out as brown instead of red? When I darken the gamma it comes out red, but it is too dark. Does NTSC lighten the gamma of the luma but darken the RGB values?

BTW, I'm using the formula:

R = Y + amplitude*sin(phase)/.877
B = Y + amplitude*cos(phase)/.492


EDIT: Wait, I figured out why it is comming out brown and not red. The color I am refering to is $x6 and it is located at 105 degrees, not 120 degrees. Tepples keeps stating that $x8 is colorburst, but from analysing everybody's palettes, it appears that the colorburst is inbetween $x8 and $x9.


Top
 Profile  
 
PostPosted: Fri Aug 17, 2012 3:46 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 2962
Location: Tampere, Finland
Bisqwit wrote:
Image

Bad Bisqwit, bad! You should have gotten permission from yourself to use the images! (Is this because the forum moved?)

_________________
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: kkfos.aspekt.fi


Top
 Profile  
 
PostPosted: Fri Aug 17, 2012 6:35 pm 
Offline
Formerly ~J-@D!~
User avatar

Joined: Sun Mar 12, 2006 12:36 am
Posts: 445
Location: Rive nord de Montréal
Hmm, file name is "idiot.png"...


Top
 Profile  
 
PostPosted: Sat Aug 18, 2012 2:36 am 
Offline
User avatar

Joined: Fri Oct 14, 2011 1:09 am
Posts: 248
thefox wrote:
Is this because the forum moved?

Yes, it was because of that. Fixed now.
Sorry about that.


Top
 Profile  
 
PostPosted: Sat Aug 18, 2012 8:16 pm 
Offline

Joined: Tue Jul 10, 2012 1:37 pm
Posts: 54
I am working on a program that needs the NES palette and it appears that there is some debate on how a palette should look so I should of course have the option to load a pal file but no one posted a pal file with the emphasis bits does anybody have accurate pal file with the emphasis bits?


Top
 Profile  
 
PostPosted: Sat Aug 18, 2012 10:01 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6286
Location: Seattle
I am going to repeat what was said when you asked the last time:

There isn't a single correct palette.

No, really, there isn't. Color $19 is greenish, except when it's next to other pixels that aren't. And it's definitely not precisely, say, #287200.

As a result, at least some of the emulation scene has done away with .pal files, because they're horrifically inaccurate.

Best practices is to either appropriate parts of blargg's nes-ntsc library, bisqwit's implementation, or implement your own NTSC demodulator.

A neat feature you could do with the last is actually replace each color swatch with a gradient of all the resultant colors a given palette entry could end up with.


Top
 Profile  
 
PostPosted: Sat Aug 18, 2012 10:57 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5724
Location: Canada
Well, even though there's no one true palette, that doesn't mean you can't create a palette that is fairly practical for using to colour your work prior to putting it on an NES. A ballpark palette is still better than just being told there is no real answer.


Top
 Profile  
 
PostPosted: Sun Aug 19, 2012 7:06 am 
Offline

Joined: Tue Jul 10, 2012 1:37 pm
Posts: 54
rainwarrior wrote:
Well, even though there's no one true palette, that doesn't mean you can't create a palette that is fairly practical for using to colour your work prior to putting it on an NES. A ballpark palette is still better than just being told there is no real answer.

That is exactly what I want to do. I would like to use a general purpose palette then if somebody for whatever reason does not like the default palette then they can load their own. Right now I am using bisqwit's code but like you said there is no right answer so people should be able to use their own pal file.


Top
 Profile  
 
PostPosted: Sun Aug 19, 2012 7:44 am 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19107
Location: NE Indiana, USA (NTSC)
The Super NES has the same dot clock and the same 341-pixel line length as the NES, which produces the same diagonal artifact pattern in composite output. Its palette is nominally RGB with 32 levels per component, but does it also have the same problem of e.g. (5, 14, 0) being "greenish, except when it's next to other pixels that aren't"? I have a few hypotheses that'll need testing, and the tests will need an interdisciplinary SNESdev team. The goal is that ultimately, the "right color" for each NES color value is the Super NES color value that produces the closest composite waveform.


Top
 Profile  
 
PostPosted: Wed Aug 22, 2012 7:21 am 
Offline
User avatar

Joined: Sun May 27, 2012 8:43 pm
Posts: 1306
tepples wrote:
The Super NES has the same dot clock and the same 341-pixel line length as the NES, which produces the same diagonal artifact pattern in composite output. Its palette is nominally RGB with 32 levels per component, but does it also have the same problem of e.g. (5, 14, 0) being "greenish, except when it's next to other pixels that aren't"? I have a few hypotheses that'll need testing, and the tests will need an interdisciplinary SNESdev team. The goal is that ultimately, the "right color" for each NES color value is the Super NES color value that produces the closest composite waveform.


I would want to see if this differs between different SNES revisions that use the S-ENC encoder versus the S-RGB encoder.


Top
 Profile  
 
PostPosted: Tue Sep 25, 2012 1:41 am 
Offline
User avatar

Joined: Sat Apr 18, 2009 4:36 am
Posts: 257
Location: Russia
neet wrote:
As I have been heavily working on "lo-fi'ing" graphics in the last months, I want to share some results with you (as it was nesdev which has inspired me a lot).
First some informations about my current algorithm (general):
I'm emulating a TV screen using a virtual composite signal, real demodulation, some glow and a little bit of pixel grid (composite is unbiased). The virtual TV gets rendered at 752x240, "scanlined" to 752x720 and stretched to 960x720.

Try to arrange TV dots as RGB-subpixels for each luminofor:

Image Image
Image Image


Top
 Profile  
 
PostPosted: Wed Sep 25, 2013 9:03 pm 
Offline

Joined: Wed Sep 25, 2013 8:49 pm
Posts: 9
Interestingly,i found bisqwit's palette generator=nestopia's palette generator(YUV)=nintendulator's palette generator(NTSC)
sat1.57+gamma2.2=nestopia's palette
sat1.87+gamma2.2=nintendulator's palette


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 150 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 9 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