Convert NTSC Famicom picture to RGB Famicom picture

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Convert NTSC Famicom picture to RGB Famicom picture
by on (#105839)
Would it be possible to read the voltages of the composite video output, to determine the palette numbers of each pixel (only 8 of 12 cycles are output, although it seems unambiguous enough to decode completely), to convert to the 6-bit palette numbers (except for $20 $30 $Ex $Fx)? And then you have the RGB palette file, which can be use to display it on a RGB display.

It will be possible to do it other way around too, if you have the palette without duplicate entries, to convert RGB to 6-bit palettes and then output NTSC Famicom signal.
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#105841)
Yes. I first proposed this years ago, and thefox ended up implementing it about a month ago.
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#105842)
tepples wrote:
Yes. I first proposed this years ago, and thefox ended up implementing it about a month ago.
That's good, that one is connected internally but I meant one that is external. Could it be made with external signal?

And such thing could be used for other purposes too, not necessarily only for displaying the picture. It could also be used to record the picture as 6-bit palettes, and possibly for other purposes.
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#105844)
Yes, there is enough information in those 8 samples per pixel to exactly calculate the 9-bit hue/luminosity/emphasis was intended. However, figuring out when to sample either involves a fairly sophisticated PLL (12×, only 10 periods of fundamental to sample, to recover subpixel phase), a 150MHz ADC, or access to both the PPU's VIDEO_OUT and 22MHz signals, the latter of which is not available except by soldering inside.
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#105862)
tepples wrote:
Yes. I first proposed this years ago, and thefox ended up implementing it about a month ago.

Suppose you didn't read the full thread. :) My mod doesn't do the composite->palette index decoding, it uses the EXT-pins on the PPU (+ some hackery, obviously).
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#105873)
What'd be the hard part about building a PLL that listens to the color burst, multiplies it by 6, and clocks a pair of ADCs on the rising and falling edges of the PLL's output?
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#105878)
tepples wrote:
What'd be the hard part about building a PLL that listens to the color burst, multiplies it by 6, and clocks a pair of ADCs on the rising and falling edges of the PLL's output?
Two ADCs are more expensive than one? Although <30MHz PLLs are substantially cheaper than >30MHz PLLs, they are not so by enough to make up the cost of the additional ADC.

But really, I just don't like the all-external design for a variety of reasons, some rational (bandwidth, power supply, enclosure), some not.
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#105958)
lidnariq wrote:
But really, I just don't like the all-external design for a variety of reasons, some rational (bandwidth, power supply, enclosure), some not.
There are surely reasons why the internal design would work better; however, there are possible reasons why an external design might be wanted in some cases, such as if you have no access to the NES/Famicom hardware for whatever reason, or if you want to have a TV set which can have such features able to be programmed in, etc
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#105961)
zzo38 wrote:
however, there are possible reasons why an external design might be wanted in some cases, such as if you have no access to the NES/Famicom hardware for whatever reason

Such as if you want to actually turn this into a product to sell. Do they still make 21.48 MHz crystals?
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#105970)
If you buy them in 10000s, you can get any frequency of crystal you want.
For our purposes, the answer is no, you cannot get a 6×NTSC CB crystal anymore.
You can still get: 1×, 4×, 8×, only. (You can get PAL CB ×1, ×4, and something very close to PAL CB×6; it's too fast by 1815ppm)
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#106032)
According to this http://wiki.nesdev.com/w/index.php/PPU_ ... escription the EXT pins only output the BG layer, and not sprites. What do you do for sprites?
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#106035)
Thefox isn't telling ... yet, at least. He probably figured out something by staring at Visual2C02. I see no reason to push him on it.
Re: Convert NTSC Famicom picture to RGB Famicom picture
by on (#106038)
lidnariq wrote:
Thefox isn't telling ... yet, at least. He probably figured out something by staring at Visual2C02. I see no reason to push him on it.


Yeah, I'm not pushing because I want him to get his product done and out for people to buy before he tells, because I'm pretty sure he'll document it later on as we are all here because of information people put out there for free. Can't wait to see the product, and the info on how it works! :)