LavaRGB mod and WDL6528 PPU

A friend of mine asked me if I could install lava RGB mod in his famicom AV.


Except the main board, there are:
* 2x DIP40 precise sockets,
* one 1x40 precise goldpin,
* one 1x40 low profile standard goldpin
* 13 pin cable
* PPU extension adapter PCB
* AV extension adapter PCB (FragolTech FT-006 / NESRGB Fami-Buddy)


I got mainboard with revision 1.2:



Though looks like there was revision 1.1 before:


Main board is already soldered with components, all you have to do is:
1) desolder the PPU from FC mainboard
2) solder DIP socket to FC mainboard
3) solder 13 pin plug to lava RGB (this plug contains: GND, chroma, luma, composite, BLUE, GREEN, RED, SYNC, console /RESET, $4016.CLK, $4016.D0, OUT0)
4) solder goldpin to lava RGB
5) solder DIP socket to lava RGB
6) solder goldpin to PPU extension adapter
7) solder lava RGB to the PPU extension adapter

If you do it in wrong order, you will be in trap because for example - soldering DIP socket first will cover the holes where you need to solder goldpin. Included instruction manual is not helpful enough about it.

After soldering everything together, all I got was grey screen. I though PPU got broken, some of the pin connectors does not work reliably, ESD killed lava RGB or so. After some inspection I found out that there is no M2 clock. Culprit was the /RESET cable.
Manual says: RST does not require welding (welding??), but in the manual's photos they are soldered.
In fact, this line is driven constantly low by the FPGA (probably this pin is not implemented at all and the FPGA is configured to drive low all unused inputs)

Desoldering /RESET cable made it work. My first impression is WOW, I used S-Video cable and there is huge difference between regular composite. Overally the PCB is well-thought - you can still unplug the lava RGB, unplug PPU from in and put the PPU into the DIP socket in famicom AV.

Ok so how it works?


FPGA sits between PPU and CPU data buses and listens to that bus.
* when CPU writes something to $2000, FPGA passes this data to PPU but with bit 6 so that PPU will always output currently rendered palette index on EXT0,EXT1,EXT2,EXT3
* FPGA also listens if any write to PPU palette occurs because it needs to store internally full copy of palette
* to distinguish between sprites and background (there is no EXT5), FPGA passes modified data to PPU via $2007 when palette range is written so that all background entries got one index and all sprites index got another one. There are 3 comparers with different threeshold to extract from PPU pin1 (video out):
* vblank
* scanline start
* sprites vs background

This is preview of what actually generates the PPU (on the left) vs what actually should be on screen added boxes over sprites):


Proper 3.3-5V translation buffers in the lavaRGB keep your console safe (the only signal that is passed directly to FPGA without translator, but only 100R resistor is series is the clock, probably to avoid false spurious edges.

My video grabber has occasional problems with capturing s-video generated from lavaRGB (image was distorted in the middle in SMB3 for example, but for simple games wthout /IRQ - all was ok). But I believe this is grabber issue.


I was going to check compatibility of lavaRGB against different PPUs.
* RP2C02G-0/RP2C02H-0 - no problems
* UA6528 - no problems
* WDL6528 - I got 14 of those chips and found out that few of them works with lava fine, while rest have artifacts but only on sprites. Appearance of those artifacts differs depending on a particular WDL6528 chip, but stays the same after power up.






I was thinking - maybe some timing issue with EXT pins as they are not used anywhere so WDL might implement them differently?

But after connecting scope probe to PPU pin 21 even on UA6528, similar issue appeared (on RP2C02G/RP2C02H, adding scope probe does not change anything).
So it was clear for me - there is something with the video signal voltage level.

After comparing all those 3 PPus - RP2C02GH has the brightest image (=highest voltage), WDL6528 the darkest (=lowest).


Solution was to replace R9=7.15k in the voltage comparer to something bigger to bring the comparision level (1.92V) lower. THe closest I had in my drawer was 10k and after replacement - all problems with WDL6528 were gone.


Out of curiosity, those comparers really are vulnerable to the voltages. When I connected simple voltage amplifier to PPU pin 21, lava RGB stopped working at all:


By the way of having all those different PPUs in my drawer, I checked all palette colors they generate (all tests done on non-lava rgb console with identical video amp circuit as shown above):

In my opinion, UA6528 gives the best (most saturated) colors.