Thanks for all the encouragement everyone.
jms2 wrote:How does it work (specifically, how does it deliver its improved output within the constraints of the original BBC system)? And how did you manage to reverse engineer something that, er, doesn't exist?

There's a good description of how the ULA works on BeebWiki and I cleared up the rest by investigation. Others have implemented the Beeb and Elk in FPGAs so I'm by no means the first to do this.
In terms of operation, it's heavily based on the Chameleon that JGH mentioned - I built one of these a few years ago but it doesn't give the full 16 colours in mode 2.
Essentially, I have a couple of octal level shifters to convert the 5V inputs to the video ULA to 3.3V and these then feed into the EPM570 development board. I started by trying to mimic the clock generation - the socket at the top of the board originally held the VIDPROC chip and I just disabled the VIDPROC a section at a time as the EPM570 functionality replaced it.
The EPM570 mimics the video ULA but also has an additional 8-bit register (located at FE23) which controls the 12-bit palette. (The blue fly lead connected to the internal TUBE connector is picking up A1.)
An initial write to FE23 sets which of the 16 colours is to be changed (top 4 bits) and the red component (bottom 4 bits). The next write to FE23 sets the green and blue components.
The usual RGB outputs from the video ULA plus the flashing bit are then used to index the 16 locations of the 12-bit palette. The 12 digital outputs then go through a resistor ladder DAC to produce analogue red, green and blue outputs. Originally, I fed these into some transistors and took the outputs to a separate DIN socket as the Chameleon does. I then happened to look at the Master schematic and realised that I could just take the analogue RGB and feed it directly back into the ULA outputs - this works for the RGB output socket but I don't think it'll work on the UHF and component outputs.
jgharston wrote:You can make a close equivalent:
mdfs.net/Info/Comp/BBC/Display/chameleon.gif.
RobC wrote:I've mentioned the Wild Vision Palettemate on here before - it came out in 1986 and gave the Beeb a palette of 4096 colours and 16 proper colours (i.e. non-flashing) in mode 2.
I've been trying to track one of these down to document the I/O control. The above mentioned Chameleon is controlled via the user port, but if you have something that plugs in the video ULA socket and a couple of flying leads then you can control it through the video ULA address range at &FE20-&FE23. That's how I access my
border colour module, a flying lead picks up A1 and &FE22 selects the border colour.
I wrote most of a VDU extension to implement VDU 19,l,x,red,green,blue to program the palette. I'll probably find the code when looking for something else.
A few months ago somebody posted the documentation for the PRISMA video system which meant that I was finally able to fill in a big gap in the OSWORD documentation. That also has a 4096-colour palette.
The Chameleon works well but I wanted 16 colours in mode 2 so that was my real motivation.(If anyone does want to build a Chameleon, I can point you at a supplier for some of the hard to obtain chips.)
I consulted your very useful memory map document before choosing FE23. I've used about 80% of the EPM570 so I hope to be able to add border control at FE22 to mimic your module.
The VDU 19 extension code would be very much appreciated as that's on my TODO list!