CPLD replacement for ZX8301

Nagging hardware related question? Post here!
User avatar
bwinkel67
QL Wafer Drive
Posts: 1224
Joined: Thu Oct 03, 2019 2:09 am

Re: CPLD replacement for ZX8301

Post by bwinkel67 »

That looks so cool!


User avatar
Cristian
Aurora
Posts: 969
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: CPLD replacement for ZX8301

Post by Cristian »

That's so promising... almost revolutionary!


lliont
Trump Card
Posts: 239
Joined: Sat Nov 22, 2014 9:18 am
Location: Athens, Greece
Contact:

Re: CPLD replacement for ZX8301

Post by lliont »

I tested the new pcb in which I added resistor mixer for scart output.
This pcb uses the EPM7160S or the EPM7128S (smd 100pin versions).

pcbnew.png

and this is the scart output on a not very good lcd TV

1671728400876.jpg

Switching to 16 color mode is done by software for both cplds but the color choosing for mode 4 works only with EPM7160S.
One can choose one of eight different color combinations for the 4 colors of the hires mode.
The choice of resistor values in the mixer to obtain better colors is to be determined. I think I'll make the dark colors darker.


User avatar
Cristian
Aurora
Posts: 969
Joined: Mon Feb 16, 2015 1:40 pm
Location: Veneto

Re: CPLD replacement for ZX8301

Post by Cristian »

That's a great result!


lliont
Trump Card
Posts: 239
Joined: Sat Nov 22, 2014 9:18 am
Location: Athens, Greece
Contact:

Re: CPLD replacement for ZX8301

Post by lliont »

I have to make a point16 and maybe a line16 super basic command to be able to use the colors.
I 'm also thinking of a substitute color command that will apply to a screen area and substitute a color with one of the 16 so I can print or draw anything in a standard color and turn it to one of the new.
Another problem is where to put the extra 6pin connector for the scart cable.


FrancoisLanciault
Trump Card
Posts: 171
Joined: Mon Aug 08, 2011 11:08 pm

Re: CPLD replacement for ZX8301

Post by FrancoisLanciault »

Maybe this has been addressed before but does your implementation uses the same pixel/memory layout as the 16 colour Aurora mode ?

François


lliont
Trump Card
Posts: 239
Joined: Sat Nov 22, 2014 9:18 am
Location: Athens, Greece
Contact:

Re: CPLD replacement for ZX8301

Post by lliont »

I don't know about the aurora but I made a first version of the color substitute command that currently applies to the whole screen so it's a bit slow (it takes a second or two) but works.
I'll make one that will take coordinates of a rectangle on the screen
It's called colsub and takes parameter a color that will substitute with it's lighter version.
It's been 30 years since the last time I wrote 68000 assembly lol.

1671915125820.jpg


Nasta
Gold Card
Posts: 446
Joined: Sun Feb 12, 2012 2:02 am
Location: Zapresic, Croatia

Re: CPLD replacement for ZX8301

Post by Nasta »

FrancoisLanciault wrote: Sat Dec 24, 2022 2:40 pm Maybe this has been addressed before but does your implementation uses the same pixel/memory layout as the 16 colour Aurora mode ?

François
No, this is based on regular mode 8 except the original flash bit is used as a brightness bit. It means that for each pixel, two bits out of four are in the even byte of a word, and the other two are in the odd byte, just one bit is treated differently.
Aurora 16 color mode uses packed bits, so each byte is divided into two 4 bit pixels. In theory the logic could be changed to implement in an advanced 8301 ULA clone, but at the cost of complicating the design.
Also, the Aurora converts everything to 3 bits per R, G, B component (so 9 bits total) which makes it possible to have actual 16 colors, without the problem of bright white being white or dark black being black, because it special cases 'bright black'. The basic format is GRBI (G being the most significant bit). It has 4 levels of gray (RGB 000,222,444,777) generated from combinations 0000,0001,1110 and 1111. For all other combinations RGBI translate to 3-bit per RGB output 0 or 4 if I is 0, and 0 or 7 if I is 1.


lliont
Trump Card
Posts: 239
Joined: Sat Nov 22, 2014 9:18 am
Location: Athens, Greece
Contact:

Re: CPLD replacement for ZX8301

Post by lliont »

This started as a ZX8301 clone project but in the process I see I can add features without making it incompatible with the standard ULA and the standard QL software, so now I got the idea from what Nasta wrote to add more bits to the color mixer and have a kind of choice of color pallet in mode 8. I have spare pins in the cpld but this is going to need new pcb again the 4th version, there is no way I can fit this in the EPM7128S and I hope it will fit in the EPM7160S. I'll see when I'll do this in the future because it takes time and it costs. I think it will be nice to have at least the 3 new pallets each one with many shades of one of the basic colors.
Since I'll make a new pcb I'll also try to squeeze in an AD724 chip to have a better quality composite video output because in my QL it sucks.


lliont
Trump Card
Posts: 239
Joined: Sat Nov 22, 2014 9:18 am
Location: Athens, Greece
Contact:

Re: CPLD replacement for ZX8301

Post by lliont »

The new command is ready.
I'm going to the Christmas table. Merry Christmas!

1672001825627.jpg

This is the composite video out on crt monitor.


Post Reply