RGB to HDMI using a Pi Zero and a small CPLD

discuss both original and modern hardware for the bbc micro/electron
User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Wed Jul 22, 2020 6:47 pm

anightin wrote:
Wed Jul 22, 2020 2:44 pm
Back to the C64 today and tried out the new C0pperdragon firmware and the Beta3 release. Once I'd read Ian's documentation, the new palette was there without the need for any programming this time :)
Good result!
i've just installed my C0pperdragon and flashed new 2.7 firwmare (release, not beta2) from github.
Can't still test the RGBtoHD becouse waiting for 4 tip jack for the cable, but i see no difference in the 288p mode with jtag pin 9&8 bridged or not... i expected strange and brighter colours... i missed something?

User avatar
anightin
Posts: 636
Joined: Thu Aug 23, 2018 2:03 pm
Location: Cambridge UK
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by anightin » Wed Jul 22, 2020 7:20 pm

aotta wrote:
Wed Jul 22, 2020 6:47 pm
anightin wrote:
Wed Jul 22, 2020 2:44 pm
Back to the C64 today and tried out the new C0pperdragon firmware and the Beta3 release. Once I'd read Ian's documentation, the new palette was there without the need for any programming this time :)
Good result!
i've just installed my C0pperdragon and flashed new 2.7 firwmare (release, not beta2) from github.
Can't still test the RGBtoHD becouse waiting for 4 tip jack for the cable, but i see no difference in the 288p mode with jtag pin 9&8 bridged or not... i expected strange and brighter colours... i missed something?
Yup, fantastic job by Ian and C0pperdragon.

With no FPGA board link or switch set I get this instead of the standard palette:
IMG_7430.jpeg
Did you reprogram your CPLD with the beta3 RGB2HDMI code from Ian?

User avatar
IanB
Posts: 641
Joined: Sun Sep 04, 2011 8:28 pm
Location: South Wales
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by IanB » Wed Jul 22, 2020 8:00 pm

aotta wrote:
Wed Jul 22, 2020 6:47 pm
i've just installed my C0pperdragon and flashed new 2.7 firwmare (release, not beta2) from github.
Can't still test the RGBtoHD becouse waiting for 4 tip jack for the cable, but i see no difference in the 288p mode with jtag pin 9&8 bridged or not... i expected strange and brighter colours... i missed something?
You have to move the switch to the other side as well

Before link fitted:
Switch towards YUV video connector = 288p
Switch in middle = 576p
Switch away from YUV video connector = 576p with scanlines

After fitting link on pins 9 & 10:
Switch towards YUV video connector = 288p
Switch in middle = 576p
Switch away from YUV video connector = 288p with high contrast palette for RGBtoHDMI

(It said power led in the wiki but the power led is on the other side on the redesigned C64C)

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Wed Jul 22, 2020 8:13 pm

anightin wrote:
Wed Jul 22, 2020 7:20 pm

Yup, fantastic job by Ian and C0pperdragon.

With no FPGA board link or switch set I get this instead of the standard palette:

IMG_7430.jpeg

Did you reprogram your CPLD with the beta3 RGB2HDMI code from Ian?
No, i've not yet tested the RGBtoHD since i've no cable for it, but it seemed strange to me that the YUV output from c0pperdragon doesn't change with or without the 9-10 bridge... the only difference i found is on scanlined 576 output, that doesn't work with bridge on.
May be c0pperdragon firmware 2.7 is different than 2.7 beta 2 Ian sent us? Which you used for blastering c0pperdragon?

User avatar
IanB
Posts: 641
Joined: Sun Sep 04, 2011 8:28 pm
Location: South Wales
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by IanB » Wed Jul 22, 2020 8:16 pm

aotta wrote:
Wed Jul 22, 2020 8:13 pm
May be c0pperdragon firmware 2.7 is different than 2.7 beta 2 Ian sent us? Which you used for blastering c0pperdragon?
The c0pperdragon 2.7 and the test version are identical

User avatar
anightin
Posts: 636
Joined: Thu Aug 23, 2018 2:03 pm
Location: Cambridge UK
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by anightin » Wed Jul 22, 2020 8:18 pm

aotta wrote:
Wed Jul 22, 2020 8:13 pm
anightin wrote:
Wed Jul 22, 2020 7:20 pm

Yup, fantastic job by Ian and C0pperdragon.

With no FPGA board link or switch set I get this instead of the standard palette:

IMG_7430.jpeg

Did you reprogram your CPLD with the beta3 RGB2HDMI code from Ian?
No, i've not yet tested the RGBtoHD since i've no cable for it, but it seemed strange to me that the YUV output from c0pperdragon doesn't change with or without the 9-10 bridge... the only difference i found is on scanlined 576 output, that doesn't work with bridge on.
May be c0pperdragon firmware 2.7 is different than 2.7 beta 2 Ian sent us? Which you used for blastering c0pperdragon?
I used the 2.7 one from here:

https://github.com/c0pperdragon/C64-Vid ... es/tag/2.7

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Wed Jul 22, 2020 8:41 pm

Thank you both for confirming..I'll made further tests

User avatar
anightin
Posts: 636
Joined: Thu Aug 23, 2018 2:03 pm
Location: Cambridge UK
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by anightin » Wed Jul 22, 2020 10:14 pm

aotta wrote:
Wed Jul 22, 2020 8:41 pm
Thank you both for confirming..I'll made further tests
I tried the connection to the standard video port and you are right, no obvious changes regardless of switch position or jumper.

It is only the jack output that seems to be affected by the new tweaks which makes sense I guess -- this is where I was getting the different palette output depending on switch position -- which is far right for my machine.

BR

Andy

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Wed Jul 22, 2020 10:30 pm

anightin wrote:
Wed Jul 22, 2020 10:14 pm
aotta wrote:
Wed Jul 22, 2020 8:41 pm
Thank you both for confirming..I'll made further tests
I tried the connection to the standard video port and you are right, no obvious changes regardless of switch position or jumper.

It is only the jack output that seems to be affected by the new tweaks which makes sense I guess -- this is where I was getting the different palette output depending on switch position -- which is far right for my machine.

BR

Andy
No, sorry but i didn't explain myself: i don't see any changes in the composite jack output, except for the rightmost switch position (the one near the cartridge port), that looks the "scanline" tv crt effect without the jumper, and not with pin 9&10 jumpered. Do you have same effects?
In the rgbtohd swith position (the one near the output jacket), i have no difference.
With the standard video port, i've a poor and not stable image, worst than with RF. So i'm afraid i've something wrong in assembling the rf replacement pcb, but i've checked and resoldered the 8 pin more times...
Anyway, this is RGBtoHD threads, and i don't want to go out of scope with c0pperdragon... :D

User avatar
anightin
Posts: 636
Joined: Thu Aug 23, 2018 2:03 pm
Location: Cambridge UK
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by anightin » Wed Jul 22, 2020 10:44 pm

aotta wrote:
Wed Jul 22, 2020 10:30 pm
anightin wrote:
Wed Jul 22, 2020 10:14 pm
aotta wrote:
Wed Jul 22, 2020 8:41 pm
Thank you both for confirming..I'll made further tests
I tried the connection to the standard video port and you are right, no obvious changes regardless of switch position or jumper.

It is only the jack output that seems to be affected by the new tweaks which makes sense I guess -- this is where I was getting the different palette output depending on switch position -- which is far right for my machine.

BR

Andy
No, sorry but i didn't explain myself: i don't see any changes in the composite jack output, except for the rightmost switch position (the one near the cartridge port), that looks the "scanline" tv crt effect without the jumper, and not with pin 9&10 jumpered. Do you have same effects?
In the rgbtohd swith position (the one near the output jacket), i have no difference.
With the standard video port, i've a poor and not stable image, worst than with RF. So i'm afraid i've something wrong in assembling the rf replacement pcb, but i've checked and resoldered the 8 pin more times...
Anyway, this is RGBtoHD threads, and i don't want to go out of scope with c0pperdragon... :D
Standard video port on mine gives so-so output like yours -- not great.

I am not near my machine now so can't try the video jack cable that came with the FPGA board ATM.

I have only used the new video jack for RGBtoHDMI so far. As expected for RGBtoHDMI it only works correctly with the switch in the right-most (cartridge slot) position and jumper in 9-10. Leftmost postion and jumper out I get wrong colours but good picture. Middle position(s) I don't get a proper display output on RGBtoHDMI.

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Wed Jul 22, 2020 11:01 pm

anightin wrote:
Wed Jul 22, 2020 10:44 pm

I am not near my machine now so can't try the video jack cable that came with the FPGA board ATM.

I have only used the new video jack for RGBtoHDMI so far.
well, give a try to the component jack output: i got an excellent quality (c64c and 8565r2 in my test), near the hdmi one!
anightin wrote:
Wed Jul 22, 2020 10:44 pm
As expected for RGBtoHDMI it only works correctly with the switch in the right-most (cartridge slot) position and jumper in 9-10. Leftmost postion and jumper out I get wrong colours but good picture. Middle position(s) I don't get a proper display output on RGBtoHDMI.
So, may be the error is the switch position itself! from c0pperdragon instructions:
"The mod board generates a YPbPr signal which can be switched to one of three modes using the onboard slider switch (right to left, when looking at the switch):
240p/288p progressive 60Hz/50Hz
480p/576p progressive 60Hz/50Hz using scanline doubling
480p/576p progressive 60Hz/50Hz with visual scanline effect"

i thought the 288p position that Ian used was the rightest "when looking at the switch", so the ones near the video connector!! :oops:

edited:
i missed the IanB post above that explained perfectly (as usual) the switch position with bridged firmware!!!
really embarassed, i'm getting old...

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Wed Jul 29, 2020 11:46 am

Cable for C64 made and tested succesfully!
c64.png
Couldn't tested the TI99/4A yet, becouse i found a DRAM issue after getting it out of his box... waiting for its repairing, i'll give a try to others TMS9929 video processor based ones (spectravideo SVI-328 and Sega Sc-3000).

User avatar
IanB
Posts: 641
Joined: Sun Sep 04, 2011 8:28 pm
Location: South Wales
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by IanB » Tue Aug 04, 2020 2:24 am

I've got 12 bit capture into a 16 bit frame buffer working and that means:

Commodore Amiga!
capture22.png
capture21.png
capture23.png
capture30.png
capture24.png

I'm picking up the 12 bit RGB data from inside the amiga so it's digital all the way and I've added interlaced video support so it should work with the Amiga's interlaced video modes as well but that is untested at the moment

There are still some issues to sort out but it looks good so far!

The main limitation is that the pixel clock maxes out at ~15 Mhz at this bit depth so it won't work with the Atari ST or the NULA as they both use a 16 Mhz pixel clock (the Amiga uses a 14.187 Mhz pixel clock). It might be possible to increase the max pixel clock if the GPU can be used to do the capture side of things.

There are actually 3 possible ways that the 12 bit option can work:
1. Capture at 12 bits per pixel via the CPLD but this requires a new board layout (I'm currently doing this with a modified 8 bit board)
2. Capture at 6 bits per pixel at double rate using a multiplexer board to alternate lo and hi 6 bit nibbles. Such a board could plug into existing converters same as the analog and buffer boards and would only need a few 74HC series parts.
3. Connect directly to a Pi zero with no CPLD at all, just some 5v to 3.3v level shifters because the pixel clock is available so regeneration inside the CPLD is not required.

User avatar
anightin
Posts: 636
Joined: Thu Aug 23, 2018 2:03 pm
Location: Cambridge UK
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by anightin » Tue Aug 04, 2020 6:22 am

Awsome news Ian =D> =D>

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Tue Aug 04, 2020 8:28 am

Impressive! Waiting for your progress!
And, about the computing power, could using a pi4 instead of the pi0 be useful?

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Thu Aug 06, 2020 12:02 pm

With a big help from Ian, i made some tests with TMS9929 retro hardware: i have not a good results with the SEGA SC-3000, but tested the same yuv to RGBtoHD cable with a Spectravideo SVI-328 and... it worked fine!
capture7.png
capture6.png
capture5.png
SVI328.txt
(165 Bytes) Downloaded 15 times

User avatar
IanB
Posts: 641
Joined: Sun Sep 04, 2011 8:28 pm
Location: South Wales
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by IanB » Thu Aug 06, 2020 7:35 pm

aotta wrote:
Thu Aug 06, 2020 12:02 pm
but tested the same yuv to RGBtoHD cable with a Spectravideo SVI-328 and... it worked fine!
Well done! Another one to add to the supported list.

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Wed Aug 12, 2020 5:46 pm

After the good results with SVI-328, i take again my SC-3000 that had some issues when first tested. Due to the same VideoProc, i thought the signals have to be spuried by the logic used to create composite output. So, i simply detach the connector to the daughter board and retested:
inside.jpg
pattern.jpg
capture4.png
capture5.png
capture6.png
I used this setting, with Ian's beta4 (they are quite the same of SVI-328):
Sega_SC3000.txt
(182 Bytes) Downloaded 11 times
I connected the R-Y, B-Y and Y respectly from P1, P2 and P3 wiring point in the mainboard to the 5 pin connector, saving ground and sound (i made a cable with an audio jack output added to the RGBtoHDMI 4 wires flat cable).
So, who's next? Colecovision or an MSX? i have to found one of them in my garage.... :lol:

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Mon Aug 17, 2020 10:09 pm

Finally 6pins cables arrived, and could tested RGBtoHDMI with my TI99/4a:
foto5.jpg
capture1.png
I used the default TI99 setting, only lowered the Y-Low to 43 for avoid some noise on purple.
And, i had no "thermal issue" as Ian found in his tests, stable images since cold booting.

User avatar
IanB
Posts: 641
Joined: Sun Sep 04, 2011 8:28 pm
Location: South Wales
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by IanB » Tue Aug 18, 2020 5:43 pm

Nice work with the SC3000 & TI99/4a.

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Tue Aug 18, 2020 5:45 pm

IanB wrote:
Tue Aug 18, 2020 5:43 pm
Nice work with the SC3000 & TI99/4a.
It's your work Ian! =D>

User avatar
tricky
Posts: 4777
Joined: Tue Jun 21, 2011 9:25 am
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by tricky » Wed Aug 19, 2020 2:42 pm

Would it be feasible to set the beeb to near max width, near max high display 30.25KB and capture the whole lot in a buffer on the PI and then rearrange the bytes to produce for example a 16 colour MODE 1 at 256x224 (linear layout) or 224x256 (column wise mem layout)?

Does anyone know how many BBC RGB2HDMI converters are out there?

User avatar
anightin
Posts: 636
Joined: Thu Aug 23, 2018 2:03 pm
Location: Cambridge UK
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by anightin » Wed Aug 19, 2020 3:20 pm

tricky wrote:
Wed Aug 19, 2020 2:42 pm
Would it be feasible to set the beeb to near max width, near max high display 30.25KB and capture the whole lot in a buffer on the PI and then rearrange the bytes to produce for example a 16 colour MODE 1 at 256x224 (linear layout) or 224x256 (column wise mem layout)?

Does anyone know how many BBC RGB2HDMI converters are out there?
Or perhaps program the Pi using external IO from the Beeb for the Pi to act as a smart framebuffer and overlay the Beeb output on top. That way you can have photo-realistic backdrops on your game screens and perhaps offload some graphics tasks such as scrolling and collision detection as well as palette switching. In it's simplest form an inverse perhaps of the RGB2HDMI setup menu... Dragon's Lair re-write Tricky 8) ?


I've got an RGB2HDMI for each of my Beebs (3) and other 8 bit micros (5).

User avatar
danielj
Posts: 8489
Joined: Thu Oct 02, 2008 5:51 pm
Location: Manchester
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by danielj » Wed Aug 19, 2020 3:29 pm

I got a couple. They're my defacto converter now :)

User avatar
Elminster
Posts: 4251
Joined: Wed Jun 20, 2012 9:09 am
Location: Essex, UK
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by Elminster » Wed Aug 19, 2020 11:55 pm

Must be over a hundred, quite a few of us have gone down the 10 board route, and now available on many platforms people might not even post here.

I have 3 I kept, wish I had used better wire on the connector, it snaps a lot with no real strain relief, Electron screen is current red.

User avatar
hoglet
Posts: 9592
Joined: Sat Oct 13, 2012 7:21 pm
Location: Bristol
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by hoglet » Thu Aug 20, 2020 9:41 am

tricky wrote:
Wed Aug 19, 2020 2:42 pm
Does anyone know how many BBC RGB2HDMI converters are out there?
I made about 20 of the original BBC RGB2HDMI board (in two lots of 10).

There are also about 30 of the Atom Video to HDMI boards out there as well, all DIY assembled.

Dave

User avatar
aotta
Posts: 283
Joined: Fri May 26, 2017 9:57 am
Location: Italy
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by aotta » Tue Aug 25, 2020 6:21 pm

Not properly a retrocomputer... but we can add the Colecovision to the list of RGBtoHDMI's supported machines:
capture7.png
capture12.png
capture13.png
with cabling directly the TMS9929 Y,Yr and Yb pins, and this settings:
Colecovision.txt
(164 Bytes) Downloaded 13 times

User avatar
BeebMaster
Posts: 3732
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by BeebMaster » Tue Sep 01, 2020 4:48 pm

I'm using RGB to HDMI to do my screencaps now, instead of recording to DVD. I resize the captures to alter the aspect ratio, and use different values for mode 7 and graphics modes. At the minute I have to select files manually depending on what mode they are, which is a bit of a faff. Is there any information inside the PNG file which distinguishes between mode 7 and other modes (which I could grep to set the aspect ratio accordingly)?
Image

tingo
Posts: 21
Joined: Fri Jul 06, 2018 1:56 pm
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by tingo » Thu Sep 03, 2020 1:07 pm

This is perhaps a stupid question, but I've checked the wiki and this thread, couldn't find the answer:
for a new computer that doesn't already have a profile / setup for the RGBtoHD / RGBtoHDMI, how do you know which frontend it needs?

There are lots of frontends: analog 6/8 bit, TTL buffer boards 3/6/8 bit and PC EGA/CGA/MDA buffer

The machine isn't a PC, so the PC buffer board is out.
Example: one of the machines is a Tiki 100: https://en.wikipedia.org/wiki/Tiki_100
which has both analog and digital RGB output connects.
--
Torfinn

User avatar
IanB
Posts: 641
Joined: Sun Sep 04, 2011 8:28 pm
Location: South Wales
Contact:

Re: RGB to HDMI using a Pi Zero and a small CPLD

Post by IanB » Thu Sep 03, 2020 5:22 pm

BeebMaster wrote:
Tue Sep 01, 2020 4:48 pm
Is there any information inside the PNG file which distinguishes between mode 7 and other modes (which I could grep to set the aspect ratio accordingly)?
I'll look at adding some way of explicitly distinguishing non-square screencaps but one option would be to read the screencap X and Y dimensions out of the png file as they will be different for mode 7 compared to the other modes

Post Reply

Return to “8-bit acorn hardware”