RGB to HDMI using a Pi Zero and a small CPLD

discuss both original and modern hardware for the bbc micro/electron
User avatar
BeebMaster
Posts: 3627
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 » Wed Jul 08, 2020 2:17 pm

Been experimenting with screen captures, I'm hoping to move to using PiRGBtoHDMI to do all my Beeb screen captures in the future. Coupled with my Econet Screen Viewer, I can capture any station's screen from one place, no need to shift hardware around.

Here's a Mode 7 picture I did earlier re-sized to 3 different aspect ratios:

3:2 (1080x720)
capture11-32.png
4:3 (1080x810)
capture11-43.png
5:4 (1080x864)
capture11-54.png
I think 5:4 looks best, it's closest to the picture I see on the TV set, what do people think?
Image

firthmj
Posts: 238
Joined: Tue May 26, 2009 9:37 am
Location: Ipswich, UK
Contact:

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

Post by firthmj » Wed Jul 08, 2020 3:29 pm

IanB wrote:
Sat Jul 04, 2020 11:45 pm

...snip...

However it might mean that it will produce an acceptable though not entirely accurate picture when connected to a Nula.
Would I be right in saying that this only applies if using a NULA to give extra colours. For some of the other functions (e.g. the Spectrum graphics emulation), I'd assume that you still get the 80s colour palettes, so the RGBtoHDMI would still work OK?
Had fun at the
Image
Meeting 21st September 2019

User avatar
IanB
Posts: 611
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 08, 2020 4:50 pm

firthmj wrote:
Wed Jul 08, 2020 3:29 pm
Would I be right in saying that this only applies if using a NULA to give extra colours. For some of the other functions (e.g. the Spectrum graphics emulation), I'd assume that you still get the 80s colour palettes, so the RGBtoHDMI would still work OK?
Yes other functions like the Spectrum emulation should be displayed with correct colours.

User avatar
sPhilMainwaring
Posts: 300
Joined: Tue Jan 15, 2013 7:57 pm
Location: Mid Wales
Contact:

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

Post by sPhilMainwaring » Wed Jul 08, 2020 6:28 pm

Just in case anybody missed Ian's chat on this amazing project

http://abug.org.uk/index.php/2020/07/04 ... -bradbury/

User avatar
aotta
Posts: 282
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 08, 2020 10:23 pm

In fact I missed it, thank you for the link and the amazing interview!

BrettRogersUK
Posts: 13
Joined: Mon Mar 09, 2015 5:58 pm
Contact:

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

Post by BrettRogersUK » Sun Jul 12, 2020 10:39 pm

HI There,

I would love to build one of these. I will use it mainly for the BBC Micro and Electron but I do also have a spectrum 48k. I will probably build all 5 or 10 boards (depending on how many I order) and give them to my family who also have a few of the retro machines too.

Question 1. I would like to ask which version of the board gerbers from the github would I need to use? Is it the ones in the KiCad_6bit folder and the V3_Standard folder?

Question 2. When making the cable do I attach all 10 cores of the ribbon to the ribbon connector but then only connect 6 of the cores to the din plug?

I already have an RGB to scart cable but i want to try this one as my display I'm using also has 2 HDMI ports so will be ideal to use.

Looking forward to building this. Thanks for all the hard work everyone involved has done in getting it to work with so many retro machines.

Kindest Regards,

Brett

User avatar
IanB
Posts: 611
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 » Mon Jul 13, 2020 5:52 pm

BrettRogersUK wrote:
Sun Jul 12, 2020 10:39 pm
Question 1. I would like to ask which version of the board gerbers from the github would I need to use? Is it the ones in the KiCad_6bit folder and the V3_Standard folder?
Yes V3 Standard is the latest and is linked from the wiki BOM page:
https://github.com/hoglet67/RGBtoHDMI/w ... t-Board%29
BrettRogersUK wrote:
Sun Jul 12, 2020 10:39 pm
Question 2. When making the cable do I attach all 10 cores of the ribbon to the ribbon connector but then only connect 6 of the cores to the din plug?
Yes, (or attach 12 cores to the ribbon connector if you fit the full 12 way header on the current design)
The connections are detailed here which shows which wires to connect with 10 and 12 way options:
https://github.com/hoglet67/RGBtoHDMI/wiki/Cables

I'm looking at doing a new issue in the next month or two with two header positions, the 12 way one as now and a 6 way one just for connecting beebs or other 3 bit TTL computers (assuming it will fit) which will make building beeb cables easier.

User avatar
IanB
Posts: 611
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 » Mon Jul 13, 2020 6:46 pm

I've just added support for some more machines although a couple of them needed some mods to get working:

1. Commodore 64!!
This one required some serious mods:
First fit c0pperdragons YUV adapter
https://github.com/c0pperdragon/C64-Video-Enhancement
Then reprogram the YUV output of the adapter using a C64 BASIC program to create a default palette that RGBtoHDMI can discriminate

The result is:
capture24.png
capture32.png
capture23.png

c0pperdragon's board is available ready built from video game perfection but you still have to fit it:
https://videogameperfection.com/product ... ent-video/
(Looks like they were supplied by TheCorfiot)

I'm getting an occasional problem with my C64 YUV board where it powers up with the video picture shifted to the left and that also results in mangled graphics. Simply power cycling the C64 fixes it so something's not getting reset properly.

2. TRS80
capture2.png
This machine has a problem because both edges of horizontal sync are derived from RC monostables and as a result they drift with temperature which requires occasional recalibration.
However I came up with a workaround which involves feeding the digital pulse that triggers the monostables to an unused pin on the TRS80 video connector. This signal is derived from the pixel clock and is stable so RGBtoHDMI can optionally use that instead and you get a stable picture with no need for recalibration.

3. Acorn System 5 80 column card
capture4.png
This one was straightforward and just worked.

I've also improved the quality of Apple IIe NTSC artifact colours and added colour burst detection so the colours automatically get switched on in graphics mode and off in text mode. The auto switching works on my NTSC Apple IIe but might not work on the PAL version.

capture27.png
capture28.png
capture25.png

User avatar
anightin
Posts: 617
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 » Mon Jul 13, 2020 6:56 pm

IanB wrote:
Mon Jul 13, 2020 6:46 pm
I've just added support for some more machines although a couple of them needed some mods to get working:
Excellent stuff =D>

C64 is next on my list then System 3 40 column card.

Screen output looks brilliant!

User avatar
aotta
Posts: 282
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 Jul 13, 2020 8:15 pm

Just ordered a C0pperdragon! Today I installed the lumafix64 to improve my C64 video output, but hdmi is a different thing!

Great strike Ian! And you didn't mention new sw works fine with Apple IIc too!

BrettRogersUK
Posts: 13
Joined: Mon Mar 09, 2015 5:58 pm
Contact:

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

Post by BrettRogersUK » Tue Jul 14, 2020 12:53 am

IanB wrote:
Mon Jul 13, 2020 5:52 pm
BrettRogersUK wrote:
Sun Jul 12, 2020 10:39 pm
Question 1. I would like to ask which version of the board gerbers from the github would I need to use? Is it the ones in the KiCad_6bit folder and the V3_Standard folder?
Yes V3 Standard is the latest and is linked from the wiki BOM page:
https://github.com/hoglet67/RGBtoHDMI/w ... t-Board%29
BrettRogersUK wrote:
Sun Jul 12, 2020 10:39 pm
Question 2. When making the cable do I attach all 10 cores of the ribbon to the ribbon connector but then only connect 6 of the cores to the din plug?
Yes, (or attach 12 cores to the ribbon connector if you fit the full 12 way header on the current design)
The connections are detailed here which shows which wires to connect with 10 and 12 way options:
https://github.com/hoglet67/RGBtoHDMI/wiki/Cables

I'm looking at doing a new issue in the next month or two with two header positions, the 12 way one as now and a 6 way one just for connecting beebs or other 3 bit TTL computers (assuming it will fit) which will make building beeb cables easier.
Thanks Ian. Will look forward to building one and then when you do a new issue I'll probably build that as well.

Great stuff, keep up the good work!

Regards,

Brett

User avatar
IanB
Posts: 611
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 Jul 14, 2020 4:58 pm

BrettRogersUK wrote:
Tue Jul 14, 2020 12:53 am
Thanks Ian. Will look forward to building one and then when you do a new issue I'll probably build that as well.
You also mentioned a 48K Spectrum above and that will require the analog board as well, see the wiki BOM for latest gerber:
https://github.com/hoglet67/RGBtoHDMI/w ... g-Board%29

Also the 48K spectrum profile can't distinguish between the bright and normal colours unlike the other Spectrums.
See the updated gallery for examples:
https://github.com/hoglet67/RGBtoHDMI/w ... Screencaps

User avatar
IanB
Posts: 611
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 Jul 16, 2020 8:59 pm

It's happening!
I've received the partly assembled boards from China:
boards.jpg
I've finished off the first 4 but I'm waiting for delivery of a some through hole parts for the rest.

User avatar
anightin
Posts: 617
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 » Mon Jul 20, 2020 12:02 am

IanB wrote:
Mon Jul 13, 2020 6:46 pm
I've just added support for some more machines although a couple of them needed some mods to get working:

1. Commodore 64!!
This one required some serious mods:
First fit c0pperdragons YUV adapter
https://github.com/c0pperdragon/C64-Video-Enhancement
Then reprogram the YUV output of the adapter using a C64 BASIC program to create a default palette that RGBtoHDMI can discriminate

The result is:
capture24.png
capture32.png
capture23.png


c0pperdragon's board is available ready built from video game perfection but you still have to fit it:
https://videogameperfection.com/product ... ent-video/
(Looks like they were supplied by TheCorfiot)

I'm getting an occasional problem with my C64 YUV board where it powers up with the video picture shifted to the left and that also results in mangled graphics. Simply power cycling the C64 fixes it so something's not getting reset properly.

2. TRS80

capture2.png

This machine has a problem because both edges of horizontal sync are derived from RC monostables and as a result they drift with temperature which requires occasional recalibration.
However I came up with a workaround which involves feeding the digital pulse that triggers the monostables to an unused pin on the TRS80 video connector. This signal is derived from the pixel clock and is stable so RGBtoHDMI can optionally use that instead and you get a stable picture with no need for recalibration.

3. Acorn System 5 80 column card

capture4.png

This one was straightforward and just worked.

I've also improved the quality of Apple IIe NTSC artifact colours and added colour burst detection so the colours automatically get switched on in graphics mode and off in text mode. The auto switching works on my NTSC Apple IIe but might not work on the PAL version.


capture27.png
capture25.png
capture25.png

Just updated my C64 this evening after receiving the C0pperdragon mod board :D

Here was what I was greeted with on cracking open the case:
Before.jpeg
MOS 6569R1 VIC-II Ceramic version
SwinSID Nano as original 6581 had died -- but now I have a chance to fit my replacement

After removing RF modulator, VIC-II shield and replacing the VIC-II socket, and the SID, then adding the board and some heatsinks for good measure:
After.jpeg

And finally the RGBtoHDMI adapter after a bit of palette juggling thanks to the excellent instructions from Ian:
RGBtoHDMI.jpeg
What a fantastically crisp display :D


I might need to re-visit the VIC-II and swap it out for a cooler one as this old thing runs really hot.


...now where did I put my games cartridge :lol:

User avatar
IanB
Posts: 611
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 » Mon Jul 20, 2020 5:22 pm

anightin wrote:
Mon Jul 20, 2020 12:02 am
And finally the RGBtoHDMI adapter after a bit of palette juggling thanks to the excellent instructions from Ian:
What a fantastically crisp display :D
That was quick, well done!

User avatar
anightin
Posts: 617
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 » Mon Jul 20, 2020 6:53 pm

IanB wrote:
Mon Jul 20, 2020 5:22 pm
anightin wrote:
Mon Jul 20, 2020 12:02 am
And finally the RGBtoHDMI adapter after a bit of palette juggling thanks to the excellent instructions from Ian:
What a fantastically crisp display :D
That was quick, well done!
Yup worked first time. I did notice it can start up with a wierd negative screen offset or some sparkly pixels but powering off the C64 and on again fixes this. Seems to be fine once it’s settled.

Will try the 40 Column Teletext VDU card on my System 3 next. I am now out of analogue boards so will have to wait to try the 80 Column card.

I need to go in your queue for x1 analogue boards please when available :)

User avatar
IanB
Posts: 611
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 » Mon Jul 20, 2020 8:46 pm

anightin wrote:
Mon Jul 20, 2020 6:53 pm
Yup worked first time. I did notice it can start up with a wierd negative screen offset or some sparkly pixels but powering off the C64 and on again fixes this. Seems to be fine once it’s settled.
I'm getting the occasional picture shift on power up as well which power cycling fixes. It's a problem with c0pperdragon's board and the 6569R1 version of the VIC II chip. (It happens on the analog output so nothing to do with RGBtoHDMI)

I've been in discussions with him about that and also adding support for his Atari equivalent of the mod. He has already done a mod to the C64 firmware which adds a high contrast palette option which I have been testing. In future that means to get it working with RGBtoHDMI you just fit a link and flip the switch, no palette reprogramming required.

This new firmware doesn't seem to have the picture shift problem either but still testing at the moment.
Do you have a USB blaster for reprogramming FPGAs?

User avatar
anightin
Posts: 617
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 » Mon Jul 20, 2020 9:27 pm

IanB wrote:
Mon Jul 20, 2020 8:46 pm
anightin wrote:
Mon Jul 20, 2020 6:53 pm
Yup worked first time. I did notice it can start up with a wierd negative screen offset or some sparkly pixels but powering off the C64 and on again fixes this. Seems to be fine once it’s settled.
I'm getting the occasional picture shift on power up as well which power cycling fixes. It's a problem with c0pperdragon's board and the 6569R1 version of the VIC II chip. (It happens on the analog output so nothing to do with RGBtoHDMI)

I've been in discussions with him about that and also adding support for his Atari equivalent of the mod. He has already done a mod to the C64 firmware which adds a high contrast palette option which I have been testing. In future that means to get it working with RGBtoHDMI you just fit a link and flip the switch, no palette reprogramming required.

This new firmware doesn't seem to have the picture shift problem either but still testing at the moment.
Do you have a USB blaster for reprogramming FPGAs?
Cool, and yup I have a USB blaster :)

Despite the occasional offset issue I get a rock solid picture for the first few minutes and then some sparkly pixels that get gradually worse the longer the system is left running. I am wondering if the heatsink I have on my VIC II is sufficient enough. I do plan to get another later revision VICII chip at some point to see if this improves.

User avatar
anightin
Posts: 617
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 » Mon Jul 20, 2020 9:34 pm

I had a play with the System 3 tonight and the 40x25 VDU card. I used Teletext mode as a starting point but am struggling to tune it to get rid of twinkling pixels on the left and right of each character. It's almost there but not quite.

Any hint on what I can tweak would be much appreciated :?
IMG_7420.jpeg
IMG_7419.jpeg

User avatar
IanB
Posts: 611
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 » Mon Jul 20, 2020 10:30 pm

anightin wrote:
Mon Jul 20, 2020 9:27 pm
Despite the occasional offset issue I get a rock solid picture for the first few minutes and then some sparkly pixels that get gradually worse the longer the system is left running. I am wondering if the heatsink I have on my VIC II is sufficient enough. I do plan to get another later revision VICII chip at some point to see if this improves.
That sounds like the VIC chip overheating, my heatsink is several times larger than the chip. Those R1 chips run really hot!
I'm replacing mine with an R5 so we'll see if that improves the temperature.
anightin wrote:
Mon Jul 20, 2020 9:27 pm
I had a play with the System 3 tonight and the 40x25 VDU card. I used Teletext mode as a starting point but am struggling to tune it to get rid of twinkling pixels on the left and right of each character. It's almost there but not quite.
Any hint on what I can tweak would be much appreciated
It's probably a combination of things but the first thing to do is switch off deinterlacing as any noise gets amplified by that.

Once that's switched off, fill across the screen with characters and check for vertical noise bars. If you see any, adjust line length like you did with the Ace. Once you get all clean or all noise, check the clock value in the helper info is roughly the same as the preset value in the menu and if not adjust it and then run calibration and hopefully get a final clean picture.

Only then turn on deinterlacing again and see if auto calibration found a good alignment setting. It might not as it's not been tested on non-bbc teletext in which case you will probably have to tweak the delay setting in the sampling menu and the vertical offset value in the geometry menu to see if you can get it to work.
If there is a problem, you might have better results with bob or simple motion at least until I can fix advanced motion.

User avatar
anightin
Posts: 617
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 » Mon Jul 20, 2020 10:49 pm

IanB wrote:
Mon Jul 20, 2020 10:30 pm
anightin wrote:
Mon Jul 20, 2020 9:27 pm
Despite the occasional offset issue I get a rock solid picture for the first few minutes and then some sparkly pixels that get gradually worse the longer the system is left running. I am wondering if the heatsink I have on my VIC II is sufficient enough. I do plan to get another later revision VICII chip at some point to see if this improves.
That sounds like the VIC chip overheating, my heatsink is several times larger than the chip. Those R1 chips run really hot!
I'm replacing mine with an R5 so we'll see if that improves the temperature.
anightin wrote:
Mon Jul 20, 2020 9:27 pm
I had a play with the System 3 tonight and the 40x25 VDU card. I used Teletext mode as a starting point but am struggling to tune it to get rid of twinkling pixels on the left and right of each character. It's almost there but not quite.
Any hint on what I can tweak would be much appreciated
It's probably a combination of things but the first thing to do is switch off deinterlacing as any noise gets amplified by that.

Once that's switched off, fill across the screen with characters and check for vertical noise bars. If you see any, adjust line length like you did with the Ace. Once you get all clean or all noise, check the clock value in the helper info is roughly the same as the preset value in the menu and if not adjust it and then run calibration and hopefully get a final clean picture.

Only then turn on deinterlacing again and see if auto calibration found a good alignment setting. It might not as it's not been tested on non-bbc teletext in which case you will probably have to tweak the delay setting in the sampling menu and the vertical offset value in the geometry menu to see if you can get it to work.
If there is a problem, you might have better results with bob or simple motion at least until I can fix advanced motion.
On the C64 yes, as it happens I came to the same conclusion and ordered an R5 this evening in the same hope that it might run cooler. I think I'll wait for that to arrive before I do any more tinkering on this machine.

Thanks for the advice on the System 3, I will go through your suggestions hopefully tomorrow and report back.

User avatar
hoglet
Posts: 9445
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 » Tue Jul 21, 2020 7:33 am

If after following Ian's advice you still have proiblems, it might be worth looking at the 6MHz clock.

Looking at the System 40x25 schematic, the means for generating the 6MHz clock is very different to the Beeb. It uses IC3 as oscillator, capacitively coupled to the 1MHz clock to keep it in phase:
sys40x25clk.PNG
This will suffer very different temporal distortion to the scheme used in Beeb.

Can you look at the 1MHz and 6MHz clocks together on a scope and post a picture?

How did you setup the preset (R3)?

Dave

User avatar
anightin
Posts: 617
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 Jul 21, 2020 12:18 pm

hoglet wrote:
Tue Jul 21, 2020 7:33 am
If after following Ian's advice you still have proiblems, it might be worth looking at the 6MHz clock.

Looking at the System 40x25 schematic, the means for generating the 6MHz clock is very different to the Beeb. It uses IC3 as oscillator, capacitively coupled to the 1MHz clock to keep it in phase:
sys40x25clk.PNG
This will suffer very different temporal distortion to the scheme used in Beeb.

Can you look at the 1MHz and 6MHz clocks together on a scope and post a picture?

How did you setup the preset (R3)?

Dave
Hi Dave,

Thanks for the prompt. When I built the card, I set the 6MHz up on the scope then hand tweaked the preset to get a good picture. All I actually needed to do was a little more tweaking to make the RGBtoHDMI happy :D
IMG_7426.jpeg
The picture is now solid.
IMG_7424.jpeg
IMG_7422.jpeg
There are a couple of niggles left in terms of interference between contrasting foreground and background colours at the edge of characters which is not resolving despite Ian's advice (see blue on yellow). It's good enough to work with for sure.

I would like to remove the small top and bottom borders (revealed by changing the border colour in the menu). What's the easiest way to do that?

User avatar
hoglet
Posts: 9445
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 » Tue Jul 21, 2020 12:32 pm

What does it look like with interlace enabled?

User avatar
anightin
Posts: 617
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 Jul 21, 2020 1:00 pm

hoglet wrote:
Tue Jul 21, 2020 12:32 pm
What does it look like with interlace enabled?
No visible effect that I can see

Update:


Here is the profile I ended up with for future reference
System_40x25VDU.txt
(139 Bytes) Downloaded 12 times

User avatar
anightin
Posts: 617
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 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 :)

IMG_7431.jpeg
IMG_7432.jpeg

User avatar
hoglet
Posts: 9445
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 » Wed Jul 22, 2020 4:18 pm

This looks really great - nice work Ian and C0pperdragon!

User avatar
hoglet
Posts: 9445
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 » Wed Jul 22, 2020 4:32 pm

anightin wrote:
Tue Jul 21, 2020 1:00 pm
No visible effect that I can see
I think what's happening here is that RGBtoHDMI is not detecting the video as mode 7 (i.e. interlaced) and is thus failing to engage the approriate capture code and deinterlacing. That's why the characters look ugly and jagged, very unlike what "mode 7" on the Beeb typically looks like.

The current mode 7 test is quite Beeb specific; it relies on very minor sync timing differences between mode 7 and the other modes. It's not surprising to me that it fails on other systems (because it's a bit of a hack!). What I think is needed is a way to bypess the mode 7 detection code entirely, and force RGBtoHDMI to tread the video as "mode 7" and engage the right capture code and deinterlacing.

Dave

User avatar
anightin
Posts: 617
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 4:56 pm

hoglet wrote:
Wed Jul 22, 2020 4:32 pm
anightin wrote:
Tue Jul 21, 2020 1:00 pm
No visible effect that I can see
I think what's happening here is that RGBtoHDMI is not detecting the video as mode 7 (i.e. interlaced) and is thus failing to engage the approriate capture code and deinterlacing. That's why the characters look ugly and jagged, very unlike what "mode 7" on the Beeb typically looks like.

The current mode 7 test is quite Beeb specific; it relies on very minor sync timing differences between mode 7 and the other modes. It's not surprising to me that it fails on other systems (because it's a bit of a hack!). What I think is needed is a way to bypess the mode 7 detection code entirely, and force RGBtoHDMI to tread the video as "mode 7" and engage the right capture code and deinterlacing.

Dave
Interesting you should say that Dave, as I did something with the adapter yesterday evening that caused the LED to flash and it not to boot. I think I was reducing one of the geometry parameters and the adapter reset then went into this funny mode.

I stripped the boards down, rebooted the PI on its own, re-assembled then re-programmed the CPLD and it was okay again after that.

When I now switch deinterlacing off I get a scanline-on effect that makes the characters look less jaggy. Switching deinterlacing on e.g. to bob1 'fills' in the horizontal gaps and hence the pictures as above -- previously before the episode with the single flashing LED, it seemed to be running in a mode where didn't seem to detect a mode 7 as you say and there was no scanline-on effect. I also have to have overscan on 'half' otherwise the picture 'flashes' as if it were interleaved with blank frames at about 1Hz intervals (this went away whilst the RGBtoHDMI menu was being displayed).

Having said all this, the above profile is the one that creates a nice stable picture on my System that I'm happy to work with -- I get the same jagged character appearance on my standard SCART->HDMI converter.

I did notice that double height characters however look much more like their BBC mode 7 equivalents on the RGBtoHDMI and my original converter.


I can certainly try any updates and would be interested if those that also have a 40x25VDU card on the forum and an RGMtoHDMI board to compare results.

Best wishes

Andy

User avatar
IanB
Posts: 611
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 6:44 pm

hoglet wrote:
Wed Jul 22, 2020 4:32 pm
I think what's happening here is that RGBtoHDMI is not detecting the video as mode 7 (i.e. interlaced) and is thus failing to engage the approriate capture code and deinterlacing. That's why the characters look ugly and jagged, very unlike what "mode 7" on the Beeb typically looks like.
I think you are correct, I will revisit this once I have built up my System 40 column teletext card:
system.jpg

Post Reply

Return to “8-bit acorn hardware”