Page 7 of 26

Re: CPLD replacement for ZX8301

Posted: Sat Oct 22, 2022 12:58 pm
by lliont
Sorry for the poor picture quality, here are 16 colors for the QL
ula16.jpg
With 3 resistors connected to the output of JP1 and to the PAL chip RGB inputs and JP2+JP3 shorted one can disable the flash bit and add 16 colors to the QL at the composite output.

By playing with the resistor values brighter or darker colors can be obtained here I use 22K. Of course 16 colors are not supported by the existing software.
ula16_2.jpg

Re: CPLD replacement for ZX8301

Posted: Sat Oct 22, 2022 2:17 pm
by tofro
lliont wrote: With 3 resistors connected to the output of JP1 and to the PAL chip RGB inputs and JP2+JP3 shorted one can disable the flash bit and add 16 colors to the QL at the composite output.
That is awesome!

Because that is how it should have been done in the first place!

Re: CPLD replacement for ZX8301

Posted: Sat Oct 22, 2022 4:52 pm
by martyn_hill
Awesome, Leon!

Re: CPLD replacement for ZX8301

Posted: Sat Oct 22, 2022 8:11 pm
by mk79
lliont wrote:The turbo bit option was in auto by default, I change it to off and the temperature dropped without affecting the operation!
Now it gets just warm but not hot.
This is cool!
Ah, I was going to ask about the Turbo bit! That is cool :-) Well done.

Re: CPLD replacement for ZX8301

Posted: Sat Oct 22, 2022 9:03 pm
by bwinkel67
tofro wrote:
lliont wrote: With 3 resistors connected to the output of JP1 and to the PAL chip RGB inputs and JP2+JP3 shorted one can disable the flash bit and add 16 colors to the QL at the composite output.
That is awesome!

Because that is how it should have been done in the first place!
Out of curiosity, I wonder how much effort (and of course cost) it would have taken had Sinclair actually done that back in 1984?

Re: CPLD replacement for ZX8301

Posted: Sun Oct 23, 2022 10:11 am
by ones' complement
bwinkel67 wrote:
tofro wrote:That is awesome!

Because that is how it should have been done in the first place!
Out of curiosity, I wonder how much effort (and of course cost) it would have taken had Sinclair actually done that back in 1984?
I think it was done to be Teletext compatible.

Re: CPLD replacement for ZX8301

Posted: Sun Oct 23, 2022 2:10 pm
by tofro
I read somewhere a David Karlin quote they were running out of output pins for the 4th colour bit on the ULA, while there was still room for some logic on the chip. Thus the FLASH feature was included and the number of colours reduced to 8.

Re: CPLD replacement for ZX8301

Posted: Sun Oct 23, 2022 2:44 pm
by ones' complement
RGB TTL ?

Re: CPLD replacement for ZX8301

Posted: Sun Oct 23, 2022 3:45 pm
by Derek_Stewart
Hi

Looks great, is there an updated PCB?

Pity SMSQ/E can not run on a BBQL, as we could have HiColour drivers on a base QL...

Re: CPLD replacement for ZX8301

Posted: Sun Oct 23, 2022 8:44 pm
by Nasta
The extra resistors should be connected to the voltage divider before the series capacitor connected between it and the actual RGB pins of the PAL chip. The extra resistor should be connected to the common point of the 8.2k resistor from the RGB signals and 1k resistor to ground, as well as the aforementioned capacitor on the way to the PAL chip RGB input pins. Connecting to the PAL chip pins directly upsets the internals of the chip so the value of the extra resistor and the change in color will not be proportional.

Why did they not do this right from the start?
There are two main reasons:
1) Decision to use TTL RGB outputs for high resolution, which only makes every one of the RGB lines be either 0 or 1, so that's 8 total color combinations. It should be noted that there were some TTL input monitors with a fourth bit, made for IBM PCs back then, but the price was more than the QL itself.
2) Not enough pins on the 8301 ULA. This is actually debatable, because a pin could have been saved if there was a HAL chip used from the start, using separate enable pins for the RAM address multiplexer (VDA) and data buffer (TXOEL) seems to be a legacy feature coming from the original design being a single chip. The data bus had to have a separate buffer because the initial versions had the 8302 ULA data bus connected to the RAM (this also required an extra pin on the 8302...). However, we know it was brought to the market in a rush so waiting for a HAL or ULA re-spin would have made it even worse.

Given decision (1), 16 colors or levels of gray would only be available through the PAL or mono outputs.

Is there an alternative way to do this? In principle yes, by using a pulse width sort of trick. As we know, a pixel in mode 8 is twice the width of a pixel in mode 4. So, when one wants to have half bright or over-bright pixels in mode 8, you could make them half wide. The other half could then be black or white. There is a small problem because depending on what the inactive half is, you get one less color. For instance, if it is black, then all colors will be half bright except of black because half bright black is black :) and if it is white, then all pixels will be overbright except white because whiter white is still white. So, some cleverness would be used to avoid losing one color, then you could also change the halves over in every other row so the half pixel mode looks like a chequerboard stipple. Unfortunately, while this would work for high res color and monochrome monitors, it would produce serious trouble with PAL output, due to pixel pattern interference with the PAL modulation scheme, which is what can easily be seen using a PAL monitor in mode 4 and using chequerboard stipples.