PAL chroma merging?

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: PAL chroma merging?

Post by thefox »

I threw together another small test:
pal-chroma-merge-test-nrom.nes
(24.02 KiB) Downloaded 328 times
This test simply has a palette of 3 colors (+ black background) and displays all 9 possible combinations. In this case the palette is $21, $26, $2B.

Emulator screenshot (Nestopia):
pal-chroma-merge-test-nestopia.png
pal-chroma-merge-test-nestopia.png (4.81 KiB) Viewed 8522 times
Photo of my TV screen (Samsung HDTV):
pal-chroma-merge-test-tv-small.jpg
pal-chroma-merge-test-tv-small.jpg (46.52 KiB) Viewed 8522 times
EDIT: Changed test to NROM, seems I made it MMC1 by mistake.
Last edited by thefox on Fri Sep 05, 2014 8:49 pm, edited 1 time in total.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
OneCrudeDude
Posts: 276
Joined: Fri Aug 23, 2013 2:14 am

Re: PAL chroma merging?

Post by OneCrudeDude »

Sorry for the bump, but a few questions:

How would this look on a CRT? Given the NES was designed to be played on a CRT, it seems like a fitting question to ask.

Is this 'trick' exclusive to the PAL region? Or could it be reproduced on NTSC systems/TVs as well?
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: PAL chroma merging?

Post by lidnariq »

OneCrudeDude wrote:How would this look on a CRT?
CRT vs LCD is orthogonal to the question I've posed here. Only after the incoming signal is converted to RGB do the differences between LCD and CRT matter.
Is this 'trick' exclusive to the PAL region?
In practice, it's exclusive to PAL. PAL specifies color recovery by using a delay line of precise length and using the additive and subtractive interference between the current and delayed color signals, while NTSC specifies color recovery by using a PLL to demodulate QAM and different bandwidths for the orange-vs-blue and green-vs-purple axes.

A few modern NTSC sets add a comb filter to attempt to exchange some vertical color resolution in exchange for horizontal, but the results are harder to predict, vary more from set to set, and may sometimes be disabled for sufficiently non-standards-compliant inputs (such as from a NES). TVs that use a "3d" comb filter would be ludicrously difficult to drive in a predictive fashion, especially given the NES's limited palette.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: PAL chroma merging?

Post by thefox »

OneCrudeDude wrote:How would this look on a CRT? Given the NES was designed to be played on a CRT, it seems like a fitting question to ask.
The results are (mostly) the same on my CRT. There are some rare color combinations that the CRT and HDTV don't seem to agree on, IIRC one of them produced a greyish tone on my HDTV, but some actual color on my CRT. Probably a detail of how the filter is implemented.

...

Does anybody have a good idea how the chroma merging could be simulated in AviSynth? I guess it should be something like 1) convert to YUV (or YCbCr, strictly speaking) 2) separate the Y, U and V planes 3) scale the U and V planes by 0.5, and blend them with a shifted version of themselves 4) combine back to YUV.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: PAL chroma merging?

Post by lidnariq »

thefox wrote:Does anybody have a good idea how the chroma merging could be simulated in AviSynth? I guess it should be something like 1) convert to YUV (or YCbCr, strictly speaking) 2) separate the Y, U and V planes 3) scale the U and V planes by 0.5, and blend them with a shifted version of themselves 4) combine back to YUV.
Using the frames from the video you'd posted, I did the following in gimp:
- Rescale nearest-neighbor down to 288 scanlines high
- Colors / Components / Decompose / YCbCr ITU R470
- Select the Cb layer; Filters / Generic / Convolution Matrix / the matrix that looks like

Code: Select all

0 0 0 0 0 
0 0 1 0 0
0 0 1 0 0
0 0 0 0 0
0 0 0 0 0
and enable normalization
- Repeat the same for the Cr layer
- Colors / Components / Compose / YCbCr ITU R470
vertical-delay.png
vertical-delay.png (14.05 KiB) Viewed 8455 times
Is this consistent with what you see?

I'd also tried using a diagonal delay (the NES's scanline is too long), but I didn't really notice an appreciable difference. I guess any difference probably requires that it operate on the modulated chroma signal, not the baseband components.
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: PAL chroma merging?

Post by tepples »

Suddenly I'm thinking of "Owner of a Lonely Heart".

Image
Warner Music
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: PAL chroma merging?

Post by thefox »

Not sure if related, but I noticed that when playing Batman on PAL NES (CRT TV), in the very beginning of level 2-1 parts of the background graphics changed colors as the screen scrolled vertically (when jumping up to the platforms with wall jump, and coming down again).

Has anybody else from PAL land noticed the same happening with Batman?
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: PAL chroma merging?

Post by Bregalad »

I didn't notice that with Batman, but I clearly remembering seeing that in Kid Icarus. It changed so much I was sure the game wrote to the colour emphasis bits, before verifying in an emulator that actually it doesn't.
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Re: PAL chroma merging?

Post by Drag »

You could get around it if you only scrolled vertically in increments of 2. That'd fix background flashing, but sprites would still have the same issue unless you locked their (display) Y position to increments of 2 as well. I don't think this would have a HUGE effect on gameplay.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: PAL chroma merging?

Post by thefox »

Bregalad wrote:I didn't notice that with Batman, but I clearly remembering seeing that in Kid Icarus. It changed so much I was sure the game wrote to the colour emphasis bits, before verifying in an emulator that actually it doesn't.
Yeah I tested Kid Icarus now as well, and it's very noticeable there right from the beginning.

I'm surprised I haven't seen this mentioned anywhere before.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: PAL chroma merging?

Post by tepples »

Anyone willing to take a scope to the PAL NES's composite output while running test ROMs to see what signals it's really outputting?
psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: PAL chroma merging?

Post by psycopathicteen »

There is also an artifact on NTSC where there are false colors on color boundaries. I think it happens when a tv signal has uneven chroma sidebands. I think it's mostly an RF problem.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: PAL chroma merging?

Post by thefox »

Not really related, but today I noticed that the emphasis bits don't work the same on PAL NES as they do on NTSC NES. For example red emphasis on NTSC NES functions as green emphasis on PAL NES.

Haven't tested it thoroughly yet.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: PAL chroma merging?

Post by tokumaru »

Now that is weird!

Noah's Ark is a PAL game that uses blue emphasis combined with the grayscale bit to flood the level with water. I can't really remember if I tried that game in NTSC mode/consoles, but I've certainly never seen the water being any other color.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: PAL chroma merging?

Post by rainwarrior »

If red and green are swapped, blue might still be the same, though.
Post Reply