I came across a blog a few weeks ago that detailed steps on emulating an NES with an FPGA. http://danstrother.com/fpga-nes/ What intrigued me the most was where the author noted that he "Completely re-wrote the PPU in Verilog (and fixed all sorts of obscure bugs in the process – and, by fixed, I mean that I actually implemented many of the NES’ quirks and bugs)" I only have a basic understanding of FPGA's but could one be used as a replacement PPU on an NES for RGB output? Hell, if it could, why not add VGA out? I know FPGA's might be cost prohibitive but I don't think 100.00 would be too much to pay considering the alternative.
I look forward to Calpis chiming in on this, as I highly respect his input on all things console logic related. In the meantime, I'll try to provide some insight based on (the little) bit that I know about the NES. Firstly, regarding the FPGA, cost, I think you are way over estimating it. Something capable of implementing the NES PPU should be far less than $100. The author indicates that his development platform used a Spartan 3 1000 FPGA to implement the entire NES, but I would not be surprised if an FPGA in the $10 to $25 range could implement just the PPU functionality and then some. Now, regarding your question on whether or not the FPGA could be made to output RGB color information, the answer is yes. Keep in mind that everything within the FPGA is digital, including the color information. I believe (and somebody feel free to correct me if I am wrong), the original NES PPU was responsible for converting the RGB values to a composite representation. Since this FPGA implementation will be calculating the raw color values based on RGB, it can output RGB, or even output in different formats such as HDMI (after HDMI protocol encoding and TMDS signaling) or YPbPr (after color conversion and analog signaling).
The NES PPU took the video signal and output composite yes, but if it was a matter of RGB->Composite we would simply tap the RGB rather than bother with swapping the NES PPU with that of the Play Choice 10 hardware.
You aren't the first to think of this It's possible to replace the original PPU with a FPGA but there are some issues: -For the last decade it's been difficult to interface FPGA with old 5V electronics. Basically you'll have to hope your game carts don't mind 3.3V logic signals which is the highest FPGA from the last decade can handle, most don't, some do (and/or lower VCC to 3.3V). Or you can buffer the outputs at the cost of board realestate (which will already be high with all the resistors to limit I/O clamping current). Another realestate isue are the two non-5V voltage supplies needed by recent FPGA. This can be taken care of with linear regulators (simple but big) or DC-DC converters (small but complex and expensive). Basically your FPGA subboard will be kind of big to fit into place. -FPGA need to be configured (assuming a normal SRAM one). Using a configuration SEEPROM is an option but it probably takes longer than the CPU to come up to speed. Some mechanism to keep the CPU reset while the FPGA is configured is probably a good idea but means a little reworking to the CPU circuit. -Writing a hardware PPU emulator is very different than implementing the actual PPU logic. People tend to take a lot of liberties when emulating a system leading to an acceptable but technically inaccurate design. This means that while his design may interface well with other logical components like the CPU or his memory arbitration system and play games faithfully, it probably cannot interface directly to a real game cart which expects exact logical operation, exact timing and exact interfaces. If this was easy to pull off people would have done it a long time ago. I think the closest anyone's come is probably Kevtris, but I'm not sure his implementation is 100% hack-free and accurate enough to actually interface with all carts. I like to think my implementation is very accurate, but I don't have the tools or time to do exhaustive tests. ---- As for the actual PPU, it doesn't translate RGB to composite, it directly generates video in the composite domain. When implementing a PPU it really doesn't matter because you can just use a lookup table to get the "equivalent" (this is a hot topic) RGB palette values. Or you can generate composite directly like the real PPU, I do it this way so I can use a TV for display instead of a monitor (needs scandoubling), it's more accurate and requires a much narrower DAC.
Which is why I stated you need a lot of resistors to limit the clamp current. Clamp diodes typically have a forward drop of 0.5V, so above 3.3+0.5=3.8V you're looking at damage. TTL outputs sometimes rise above 3.8V, 5V NMOS/CMOS as seen in 8 and 16-bit systems routinely rise to nearly 5V and are good current sources. 5V is TTL BTW, the LV stands for low voltage or <=3.3V supply-friendly.
I certainly never thought I was the first to think of this but I had not yet come across much information regarding the matter other than a little hearsay. It's nice to get some clarification.
I'm sure plenty of people would love to see a drop in replacement PPU that supports RGB and perhaps S-Video or Component. Maybe not a huge number but I know I would. Or just a quality NES/Famicom clone that is perfectly accurate but also features RGB Video output. Though I've found the Composite output from a standard US NES is not really that bad. But I have a good CRT as well.
This has been done before, and will be done again. (albeit with more or less bugs and mistakes) http://kevtris.org/nes/index.html http://kevtris.org/Projects/console/index.html A drop-in PPU Replacement with proper Digital RGB Output (e.g. LVDS or DVI).
Who is this Kevin Horton guy? It seems like I see him or "kevtris" pop up a lot. I was just on gamesx.com and saw his name in an article over there.
Ask him yourself; http://kevtris.org/Contact/index.html Also I DO recall a separate project started (before/elsewhere) for a PPU replacement chip. I think someone was trying to reverse engineer a Playchoice 10 PPU (Its special). May have had to do with building a N.o.a.C.