nesdev.com
http://forums.nesdev.com/

What's the reason for the missing PPU cycle on even frames?
http://forums.nesdev.com/viewtopic.php?f=2&t=17061
Page 2 of 6

Author:  lidnariq [ Mon Feb 19, 2018 2:18 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

Everything I'd read stated that demodulators most often demodulated too much into Q, not failed to demodulate content in I.

Author:  NewRisingSun [ Mon Feb 19, 2018 2:20 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

If you are demodulating Q at 1.5 MHz for an RF signal, you are in fact demodulating too much Q, according to the numbers I quoted. ;)

As I said, the difference is mostly relevant for RF signals, which is all the original 1953 NTSC standard mentions. For baseband composite signals, you can do everything at 1.5 Mhz according to SMPTE 170M (as I have done in my test pictures) as you stated, and everything should be fine.

Author:  lidnariq [ Mon Feb 19, 2018 2:27 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

Right, that was my point.

My understanding was that there was a brief time in the dawn of NTSC where true separately bandlimited YIQ decoding was the only thing done, but it was one of the first things to be removed in the name of cost reduction. By the 1980s, my understanding is that more-or-less everyone had just switched to equal-bandwith YUV decoding instead.

And that at no point had they done YUV or YIQ demodulation with only 600kHz for the entire chrominance signal altogether.

Mind, if we can find a sufficiently old TV showing such abominable chrominance bandwidth, I will go find a hat to eat.

Author:  NewRisingSun [ Mon Feb 19, 2018 2:30 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

Let me simulate a few images demonstrating the various decoding bandwidths...

Author:  NewRisingSun [ Mon Feb 19, 2018 2:45 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

RF video, overall 4.2 MHz bandwidth, equiband YUV decoding at 0.6 MHz.
Attachment:
RF-YUV0.6MHz.png
RF-YUV0.6MHz.png [ 89.98 KiB | Viewed 1255 times ]


RF video, overall 4.2 MHz bandwidth, equiband YUV decoding at 1.5 MHz.
Attachment:
RF-YUV1.5MHz.png
RF-YUV1.5MHz.png [ 70.17 KiB | Viewed 1255 times ]


RF video, overall 4.2 MHz bandwidth, 1953 NTSC YIQ decoding with I at 1.5 MHz and Q at 0.6 MHz. This one looks really weird in the yellow-green bushes, because the unequal bandwidths result in funky transitory colors that don't appear with equal bandwidths, even when they're low.
Attachment:
RF-YIQ.png
RF-YIQ.png [ 90.44 KiB | Viewed 1255 times ]


Baseband composite video, unrestricted overall bandwidth, equiband YUV decoding at 1.5 MHz:
Attachment:
Composite-YUV1.5MHz.png
Composite-YUV1.5MHz.png [ 92.35 KiB | Viewed 1255 times ]


Baseband composite video, unrestricted overall bandwidth, equiband YUV decoding at 3.5 MHz:
Attachment:
Composite-YUV3.58MHz.png
Composite-YUV3.58MHz.png [ 78.04 KiB | Viewed 1255 times ]


The last one is never used, because as you can see, the high chroma bandwidth basically steals all the luma detail, and so is pointless.

Author:  lidnariq [ Mon Feb 19, 2018 3:04 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

Stealthy Mario!

I have to say, the way that the coin disappears in the status line, the way the title box blurs off the sides, and the extent to which it's hard to see Mario in front of a green bush make me skeptical that 600kHz bandwidth was ever used for I.

Author:  NewRisingSun [ Mon Feb 19, 2018 3:11 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

Did you know that in the 1950s, network transmissions to local TV stations were limited by Bell System's L1 coaxial cable to 2.7 MHz bandwidth for the entire video signal? "By heterodyning the subcarrier and its adjacent side-bands to a lower frequency, within the cable passband, before transmission, and heterodyning them back to the standard values after transnmission, and by cutting off the luminance signal at a frequency low enough to avoid interference with the subcarrier and its side-bands while the signal is on the cable", the picture must have looked like stew in the sun. I don't know enough about the details of that process, otherwise I'd simulate it as well...

Author:  lidnariq [ Mon Feb 19, 2018 3:18 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

Wikipedia says that color NTSC was only adopted in 1953; I wouldn't be surprised that even if the remodulation to transmit it over an L1 line could support chrominance, that almost no-one saw it.

Wikipedia seems to have an article about L1? Looks like it's "just" baseband?

Author:  psycopathicteen [ Mon Feb 19, 2018 4:24 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

How many pixels wide are the .6Mhz and 1.5Mhz filters?

I don't know if any composite system ever used this, but I've been experimenting with filters and I discovered if you scale the image to 512x448, make a non-bandlimited chroma signal, then lowpass filter it with a {.333, .333, .333} filter, then sharpen it with a {-.25, 0, 1.5, 0, -.25} filter, then subtract the image from the original chroma signal, it comes out surprisingly clear.

I don't think there is any way they could've made a 320x224 Sega Genesis game on composite or RF look clear without a frame delay comb filter.

Author:  tepples [ Mon Feb 19, 2018 7:53 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

0.6 MHz is close to 1/6 subcarrier, or 9 pixels per period.

1.5 MHz is close to 5/12 subcarrier, or 3.6 pixels per period.

But are the "0.6 MHz" pictures above actually using 0.6 MHz bandwidth (3.3-3.9 MHz), or 0.6 MHz deviation from the subcarrier's nominal frequency (3.0-4.2 MHz)? The difference matters when using Nyquist's theorem to translate bandwidth of a QAM carrier to usable pixels.

Author:  NewRisingSun [ Mon Feb 19, 2018 11:09 pm ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

tepples wrote:
0.6 MHz deviation from the subcarrier's nominal frequency (3.0-4.2 MHz)?
This. The 0.6 MHz limitation comes from limiting the signal at 4.2 MHz, or 3.6+0.6 MHz. Which is why I actually don't understand how a TV, even if it tried to, could get 1.5 MHz chroma bandwidth from an RF-modulated NES signal, because the upper sideband will be partially lost. Unless the NES' RF modulator does not actually limit the signal to 4.2 MHz, that is...

Basically, I use a product detector for demodulation: multiply the composite signal with two carriers (inverted burst and inverted burst plus 90 degrees), gaussian filter the multiplied signal to the assumed chroma bandwidths, then subtract the filtered chroma signals from the composite signal to get luma. Working at four times subcarrier (14.32 MHz), I use a gaussian width of 4.78 for 1.5 MHz (14.32/4.75/2) and a width of 12 for 0.6 MHz (14.32/0.6/2). You tell me if that's wrong. For the overall bandwidth, I am filtering the recovered luma signal either not at all for unrestricted baseband, or with a gaussian width of 1.70 for 4.2 MHz (14.32/4.2/2). I should be doing this at the very beginning, since the 4.2 MHz cap is done by the RF modulator. But if I do that, I remove not only fine chroma detail, but a lot of chroma amplitude as well, so this may hint at an error in my method.

Author:  lidnariq [ Tue Feb 20, 2018 12:39 am ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

psycopathicteen wrote:
{.333, .333, .333} filter, then sharpen it with a {-.25, 0, 1.5, 0, -.25} filter
Because those are both FIR filters, you can just convolve the two together:

[-1/12 -1/12 5/12 1/2 5/12 -1/12 -1/12]

Performance of this one is ... kinda dubious.

The original boxcar filter puts two poles at the origin, and two zeroes at ±(Sample rate÷3) Hz. (In other words, exactly at the chroma modulation frequency)

Adding the extra sharpening filter puts a bunch of zeroes on the real axis (and more poles at the origin), causing a bit of gain just below the zero, probably there to compensate for the too-slow rolloff of the original one-zero notch filter.
Attachment:
File comment: # using octave
% [mag,w]=bodemag(filt(conv([1/3 1/3 1/3],[-1/4 0 3/2 0 -1/4]),[1],11/3/39375000))
% loglog(w/2/pi,mag)

nn565nn-log.png
nn565nn-log.png [ 3.49 KiB | Viewed 1196 times ]


Constraining yourself to linear filtering makes this harder than it has to be: the actual TV isn't working purely on baseband luminance and modulated chrominance components. By working on demodulated chrominance, you get a "non-LTI" system that supports sharper filtering for cheaper.



NewRisingSun wrote:
Which is why I actually don't understand how a TV, even if it tried to, could get 1.5 MHz chroma bandwidth from an RF-modulated NES signal, because the upper sideband will be partially lost.
The upper sideband is partly lost. But the lower sideband is still present.

NTSC itself is modulated using "vestigial" sideband, and it's not clear to me why the lower sideband is still broadcast. (But they kept it for ATSC, so there must(edit: typo) be a good engineering reason. Makes it easier to synchronize to the carrier, I suppose?)

Quote:
Unless the NES' RF modulator does not actually limit the signal to 4.2 MHz, that is...
That's also true. (You can see this by looking on adjacent TV channels when the RF switch is on. Lots will have a dirty copy of the NES's video output from all the harmonics it's generating).

I think the demodulator in the TV does limit what's decoded, even those the modulator isn't.

I should remember to plug the RF output of my SNES into my oscilloscope and get a spectrum plot. It's no spectrum analyzer, but I bet even with crappy resolution I'll see a few interesting things.

(Or maybe someone else has a newer nicer 'scope and wants to beat me to it)


Quote:
You tell me if that's wrong.
Gaussians aren't "realistic" because they're noncausal, but I'm not certain what kind of actual filters were used.

Author:  NewRisingSun [ Tue Feb 20, 2018 2:08 am ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

I used a Gaussian filter because it was explicitly recommended in Section 7.3 of SMPTE-170M.

Author:  lidnariq [ Tue Feb 20, 2018 10:43 am ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

Then who am I to argue?

Author:  NewRisingSun [ Tue Feb 20, 2018 11:20 am ]
Post subject:  Re: What's the reason for the missing PPU cycle on even fram

I still need a different filter to simulate the 4.2 MHz channel bandwidth cap (the one that the NES' RF modulator does not enforce). My normal Gaussian filter method won't work, because it's too gradual, taking almost all of the subcarrier with it, hence the desaturation. I would need basically a flat response from 0 to 4.2 MHz, then a narrow transition band from 4.2 to 4.5 MHz, with basically infinite attenuation at 4.5 MHz, all for a sampling frequency of 14.32 MHz.

Page 2 of 6 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/