RGB to HDMI using a Pi Zero and a small CPLD

discuss both original and modern hardware for the bbc micro/electron
User avatar
IanB
Posts: 690
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 »

Mince wrote:
Sun Nov 15, 2020 12:38 pm
It defaults to 8x CPLD and changing it higher seems to make the picture worse for me.
Did you re-run the calibration after changing the multiplier?
User avatar
Mince
Posts: 87
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

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

Post by Mince »

IanB wrote:
Sun Nov 15, 2020 7:35 pm
Did you re-run the calibration after changing the multiplier?
Doh, no I didn't! If re-run it, the picture improves, but I think it's pretty much the same as the 8x mode, so I guess I might as well stick with that.

Thanks for your help (again).
User avatar
BeebMaster
Posts: 3866
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 »

I just noticed some "glitching" in mode 7 with the letter K. It was actually when using Wordwise Plus II which prints "Ctrl K" on screen in blue text with yellow background, and I saw the K was "twinkling" a bit, which is what I've replicated here. It's hard to tell from a still picture, but In the second picture, there's quite a noticeable "jagged" effect on the last 3 characters on the second line.
capture470.png
capture472.png
I tried re-calibrating, and it went back to the setting I already had (offsets 2) which was better than any of the others. It only seems to affect the letter K, although I have noticed for a while that during the time it's actually drawing characters on (mode 7) screen whilst typing, the same effect appears briefly with most characters until it moves on to the next character.

Anything else I can try to fix it?
Image
User avatar
danielj
Posts: 8543
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 »

BeebMaster wrote:
Wed Nov 18, 2020 10:16 pm
Anything else I can try to fix it?
Put in a better quality 16mhz crystal?

d.
User avatar
IanB
Posts: 690
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 »

BeebMaster wrote:
Wed Nov 18, 2020 10:16 pm
I tried re-calibrating, and it went back to the setting I already had (offsets 2) which was better than any of the others. It only seems to affect the letter K, although I have noticed for a while that during the time it's actually drawing characters on (mode 7) screen whilst typing, the same effect appears briefly with most characters until it moves on to the next character.
The effect you see when typing is de-interlacing which happens when there is any motion in the image and a new character being typed is counted as motion for the first frame that it appears. The occasional pixel glitches are also treated as motion so that's why you see the same effect.

There are several things to try with mode 7 noise:
Are you running the latest software?
If not, do a clean install to the latest software, update the CPLD, change the profile to "BBC 24MHz Mode7" and recalibrate.
This runs mode7 at a higher sample rate to try to eliminate noise. Note recalibration takes much longer in this mode.
This overclocks the CPLD a little but should work. If there is still noise, go into the sampling menu and change the multiplier setting from x12 to x16 and recalibrate again. This will overclock the CPLD a lot so may not work and you might get streaks or blank screens when calibrating.

How long is your cable? Try shortening it to 30cm if much longer than that.

Latest software here:
https://github.com/hoglet67/RGBtoHDMI/r ... 13_0471da6
Direct link:
https://github.com/hoglet67/RGBtoHDMI/r ... 471da6.zip
User avatar
BeebMaster
Posts: 3866
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 »

Thanks, I'll try a firmware update shortly. It's not likely to be up to date, I haven't changed anything since all that fun we had with the "slow"/"suspect" Kingston SD card earlier in the year. I did just try the Master 24MHz profile, but that made it worse so I've gone back to my saved profile.

I wonder if it might be heat related as well? The Pi is very hot now and it seems to be slightly worse than from a cold start.
Image
mike351
Posts: 1
Joined: Wed Nov 18, 2020 9:33 am
Contact:

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

Post by mike351 »

Hi everyone,
First of all I would like to say how awesome this project is and to acknowledge the hard work by all involved.

I put one of these together using a pre-made PCB from here https://www.tindie.com/products/cyberne ... converter/ and a Pi Zero, with the intent of using it on a Commodore 128 (RGBi) connected to a 22" TV via HDMI.

I followed the guide and have set the resolution for 640 x 480@50hz. Profile is set to Commodore128 80 Col and pallet is RGBi. The image crisp and stable, however I am not sure of the colours are correct.

Here is what I get when I run a simple basic program to display all 16 colours.
https://flic.kr/p/2k84Abc

Compared to the colour output of another project

https://flic.kr/p/2k7ZQqV
Any help much appreciated.

Mike
User avatar
IanB
Posts: 690
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 »

mike351 wrote:
Thu Nov 19, 2020 3:19 am
Profile is set to Commodore128 80 Col and pallet is RGBi. The image crisp and stable, however I am not sure of the colours are correct.
The C128 profile was posted by another user and I don't have one so I've never tested it, however looking at it in more detail I can see that the main problem is the sample mode in the sampling menu is set to 3 bits per pixel and it should be set to 6 bits per pixel for RGBI as that has 4 bits so the intensity bit is being dropped in 3bpp mode. Change that setting to see if it fixes the problem.

Also note that real IBM CGA monitors display the lower intensity yellow as brown athough not all RGBI monitors do that.
The photo you linked does show colour 10 as brown so if you want to simulate that you have to change the palette from RGBI to RGBI (CGA)
mike351 wrote:
Thu Nov 19, 2020 3:19 am
...connected to a 22" TV via HDMI
I followed the guide and have set the resolution for 640 x 480@50hz.
What is the native LCD resolution of the TV?

EDIT:
Here is an updated Commodore 128 50Hz/PAL profile:
Commodore_128-80col.txt
(164 Bytes) Downloaded 14 times
As well as the sample mode it had other minor issues with the geometry.
Overwrite \Profiles\6-12_BIT_RGB\Commodore_128-80col.txt on the SD card with this version, reboot the Pi and use Restore Default Configuration to remove any saved values then try again.

This profile will need some minor adjustment as there are a couple of things that can only be set with actual hardware:
1. Change the background colour or fill the entire screen with text so you can see the top/bottom/left/right edges of the active screen area.
2. go into the Geometry menu and change "Setup Mode" to "Set Min/Offset".
This will reduce the size of the capture area to 640x200 with a green border
3. Adjust the H Offset (to the nearest 4 pixels) and V Offset values until all the visible screen is centralised in the capture area
4. Exit the geometry menu
5. Go into the Sampling menu and change "Setup Mode" to "Set Delay".
6. Adjust the delay value to fine trim the left/right position to pixel accuracy
7. Exit the menu and save the config.

Post the values you used for Hoffset, Voffset and Delay and I will update the profile for the next release.

Here is a 60Hz NTSC profile as well (untested and also requires offset optimisation):
Cmd_128_60Hz.txt
(164 Bytes) Downloaded 16 times
User avatar
aotta
Posts: 286
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 »

IanB wrote:
Thu Nov 19, 2020 1:01 pm
mike351 wrote:
Thu Nov 19, 2020 3:19 am
Profile is set to Commodore128 80 Col and pallet is RGBi. The image crisp and stable, however I am not sure of the colours are correct.
The C128 profile was posted by another user and I don't have one so I've never tested it, however looking at it in more detail I can see that the main problem is the sample mode in the sampling menu is set to 3 bits per pixel and it should be set to 6 bits per pixel for RGBI as that has 4 bits so the intensity bit is being dropped in 3bpp mode. Change that setting to see if it fixes the problem.

Also note that real IBM CGA monitors display the lower intensity yellow as brown athough not all RGBI monitors do that.
The photo you linked does show colour 10 as brown so if you want to simulate that you have to change the palette from RGBI to RGBI (CGA)
I posted here the C128 profile i used in my test (and Ian added to the repository), but i must admit i didn't make many tests, and had only a quick check to colours, comparing them with the scart cable output. So, optimized and more accurate profile is welcome!
User avatar
BeebMaster
Posts: 3866
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 »

I updated, re-calibrated etc. and it's looking very nice now:
capture5.png
capture8.png
A couple of things I noticed that are different from before. When the menu is on screen, the picture behind loses a lot of resolution. Is that normal?
And when taking a screenshot, the screen flicks a couple of times before re-drawing now. Is that normal as well?

Last thing...when doing a capture, can it capture using the Sharp/Soft setting? I like it on soft, or softer, but the captures are always "sharp".
Image
User avatar
IanB
Posts: 690
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 »

BeebMaster wrote:
Fri Nov 20, 2020 12:22 pm
When the menu is on screen, the picture behind loses a lot of resolution. Is that normal?
There shouldn't normally be any change when the menu is on screen other than the beeb output being dimmed.

The only loss of resolution I'm aware of is if you are using the BBC NULA 12bpp Mode7 profile which will switch off interlace in mode 7 when the menu is on screen but you shouldn't be using that profile anyway as it's for use with the NuLA when directly connected by a 16 way cable. The video will only be at 50% intensity when connected via the normal RGB cable.

If it isn't the above, can you post a screencap (using the up & down buttons)

As suggested previously, you should try the "BBC 24Mhz Mode7" profile which increases the resolution of sampling.
BeebMaster wrote:
Fri Nov 20, 2020 12:22 pm
And when taking a screenshot, the screen flicks a couple of times before re-drawing now. Is that normal as well?
Yes it captures a few frames after the button press to eliminate some glitches in screencaps when running at 12bpp
BeebMaster wrote:
Fri Nov 20, 2020 12:22 pm
Last thing...when doing a capture, can it capture using the Sharp/Soft setting? I like it on soft, or softer, but the captures are always "sharp".
At the moment only sharp is available on capture because the soft interpolation filtering is done in hardware on the Pi's scaler and the results is sent directly to the HDMI output so isn't available to the CPU.
User avatar
BeebMaster
Posts: 3866
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 »

It didn't actually capture the menu, but it did capture what the Beeb picture looks like when the menu is on:
capture12.png
I used my old profile from before the firmware update (and had to use the old monitor resolution file as it wasn't in the new firmware) but I did re-calibrate. Maybe something to do with that and I should start again from scratch with profiles?
Image
User avatar
IanB
Posts: 690
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 »

BeebMaster wrote:
Fri Nov 20, 2020 3:50 pm
I used my old profile from before the firmware update (and had to use the old monitor resolution file as it wasn't in the new firmware) but I did re-calibrate. Maybe something to do with that and I should start again from scratch with profiles?
You must always install the new software on a blank micro SD card, overwriting an existing installation will create a hybrid unstable mess.

At the moment profiles are not guaranteed to be compatible between versions and certainly aren't with the old version you were running so you will have to start from scratch and re-create any tweaks.

What monitor resolution was missing?

In any case you shouldn't need to set a monitor resolution anymore and in most cases either Default@EDID or Auto@50Hz-60Hz are all that's needed.

See the updated quick start guide:
https://github.com/hoglet67/RGBtoHDMI/w ... tart-Guide
User avatar
BeebMaster
Posts: 3866
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 »

It wasn't a blank card, but I moved the entire previous contents into an "Old" directory first, so I think that counts as the same thing.

Although the Dell monitor I use at my captures station is 1280x1024 it doesn't look very nice in that mode, and needs 1280x960, which I what I restored from "Old".
Image
User avatar
Mince
Posts: 87
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

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

Post by Mince »

IanB wrote:
Thu Nov 19, 2020 1:01 pm
EDIT:
Here is an updated Commodore 128 50Hz/PAL profile:
Commodore_128-80col.txt

...

This profile will need some minor adjustment as there are a couple of things that can only be set with actual hardware:
I've tested the new colour palette on my 128DCR and it looks much better, thanks. The dark yellow is dark yellow and not brown, as I think some CGA monitors will display: the C128 Programmer's Reference Guide describes the colour as "dark yellow" so I think that's right. Here's a picture:
80 column screen on C128DCR
80 column screen on C128DCR
As for adjusting the position for the profile, I have an Hoffset=184 and Voffset=58 and it fits precisely.

The Sampling / Setup Mode / Set Delay has presumably changed description in the latest release as I have Set Pixel H Offset and the best value is 5.

Thanks for that - looking excellent!
User avatar
IanB
Posts: 690
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 »

Mince wrote:
Tue Nov 24, 2020 12:16 am
As for adjusting the position for the profile, I have an Hoffset=184 and Voffset=58 and it fits precisely.
Thanks for that info, I've updated the profile accordingly.

One other thing you might be able to test:
I noticed that you can get 640x400 interlaced out of the system and RGBtoHDMI should be able to display that but it needs the "Video Type" setting in geometry changed from "Progressive" to "Interlaced".
It may be possible to leave that permanently on interlaced but it depends what sort of sync is output in progressive mode.

Can you post a screencap of the "Source Summary" page in the info menu so I can see if it's possible to set that permanently.
(Press the up & down buttons together to screencap in a menu)
User avatar
Mince
Posts: 87
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

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

Post by Mince »

Thanks... I've attached the Source Summary for when the Geometry is set to Progressive (I assume it doesn't matter which, though: all that looks different to me is a slightly different Pixel clock and CPLD clock, but that seems to change anyway). This in regular 80 column text mode:
RGBtoHDMI Source Summary for C128 in 80 column mode
RGBtoHDMI Source Summary for C128 in 80 column mode
Do you need me to try and get some 640x400 graphics on the screen, though? That isn't something that looks easily doable from BASIC, though, so I'll have to either find something or write something.
User avatar
IanB
Posts: 690
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 »

Mince wrote:
Wed Nov 25, 2020 9:43 pm
I've attached the Source Summary for when the Geometry is set to Progressive
Thanks. It's outputting progressive sync which is good (The lines per frame setting would show 625 interlaced in brackets if it was interlaced sync)

When the video type is set to progressive, all video is treated as progressive so if you feed an interlaced source in it will just alternate the odd and even fields without increasing the vertical resolution.

When the video type is set to interlaced, if the source has interlaced sync it will deinterlace the video at double vertical resolution so 400 lines instead of 200. If progressive sync is used in this mode then it reverts to a progressive display at 200 lines so it will look no different to setting the video type to progressive.

The reason this isn't the default is that the bbc outputs progressive video with interlaced sync (*TV0,0) by default and this would then be treated as interlaced video and de-interlaced with resultant deinterlacing artifacts (weaving or jitter) so with the beeb you can't rely on the sync type to switch between modes but it looks like you might be able to on the C128 assuming the video chip actually outputs interlaced sync in its 400 line mode.

Assuming the C128 video chip can be configured to output interlaced sync then that will be used as the signal to automatically switch between progressive and interlaced mode so you don't have to do anything else other than select the video type as "Interlaced".
Mince wrote:
Wed Nov 25, 2020 9:43 pm
Do you need me to try and get some 640x400 graphics on the screen, though? That isn't something that looks easily doable from BASIC, though, so I'll have to either find something or write something.
Before running any 400 line demo, first set the video type to Interlaced. You can then leave it on interlaced permanently.
Again check the Source summary page which this time should show: 312 (625 Interlaced) for lines per frame. If it does then you should find your 400 line demo is deinterlaced, however unlike teletext mode, deinterlacing quality is not great at the moment, with options of weave and bob which will either be rock steady but show combing lines on movement for weave or vertical shimmer for bob.

Deinterlace type is controlled by the "Normal deinterlace" setting in the preferences menu.

I have also seen mention of a 700 line mode which must have non-standard timing and that would need a separate profile which might be auto selectable if the timing is different enough. Do you have any further info on that?
User avatar
Mince
Posts: 87
Joined: Thu Sep 05, 2019 11:25 pm
Location: Cambridge, UK
Contact:

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

Post by Mince »

I've left V sync type = Auto and set Video Type = Interlaced and I still get 312 lines. If I also change V sync type = Interlaced, too (so both say Interlaced), it still says 312: I don't get the "(625 Interlaced)" bit.

It'll take me a little time to try running some tests as I'm not familiar with the C128 (or C64, for that matter), so it'll take me a little time to work out how to drive the VDC.
User avatar
IanB
Posts: 690
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 »

Mince wrote:
Wed Nov 25, 2020 11:29 pm
I've left V sync type = Auto and set Video Type = Interlaced and I still get 312 lines.
If I also change V sync type = Interlaced, too (so both say Interlaced), it still says 312: I don't get the "(625 Interlaced)" bit.
That line shows what's coming out of the C128, it won't change to interlaced unless the C128 actually outputs interlaced which I presume would require some demo software that puts it in that mode.

The settings on RGBtoHDMI merely indicate how it will handle an interlaced source when it is available.
User avatar
IanB
Posts: 690
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 »

There is a new interim dev release available:
https://github.com/hoglet67/RGBtoHDMI/releases

direct link:
https://github.com/hoglet67/RGBtoHDMI/r ... d102ae.zip

This has several significant changes:

Auto multiplier ranging on mode 7 calibration
This improves mode 7 picture quality on systems with asymmetric mode 7 pixel clocks by automatically changing from x8 multiplier to x12 multiplier if it can't find a noise free sampling phase when running the auto calibration. There is no need to manually switch to the "BBC 24Mhz mode7" profile anymore so that has been removed.
To get the best calibration result, perform the calibration on your worst case mode7 image and then save the configuration.
If you still can't get completely noise free you can manually switch to x16 multiplier in the sampling menu and try again but that setting will really overclock the cpld and only works on about half the boards I tested.

Many 60Hz (NTSC) profiles have been added
There are now 60Hz profiles for the following:
Apple II
Tandy color computer
ZX80
ZX81
Spectrum 48K *
Commodore 64 *
Commodore 128 *
Amiga *
TRS80 *
Atari 800 *

Ones marked with a * are untested as I don't have 60Hz versions of those machines
Both 50Hz and 60Hz profiles are available when you select the above computers and the right one is selected based on the incoming sync frequency.

The Commodore 128 profile has been updated to fix the reported issues.

Auto scaling the BBC profile with a 1280x1024 monitor now selects interpolation rather than integer scaling as some modes were getting pixels clipped off the right hand edge (You can still select integer scaling manually)

Various minor profile tweaks and bug fixes.
rodders
Posts: 89
Joined: Thu Jun 25, 2020 3:40 pm
Location: Somerset
Contact:

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

Post by rodders »

I've just built my kit and fired it up (without the 12 bit adapter for now) and all seems well except:
1) Integer scaling works great in modes 0-6 but in mode 7 most of the bottom line of text is cut off. Auto works fine but does not fill the screen as well.
2) Genlock is inhibited because the monitor is running at 60Hz, but the LED keeps flashing, is there any way to turn it off?
The monitor I'm using is a Benq T905 which has a native resolution of 1280x1024@60Hz

P.S. Admiration is due to all those involved in this project, its a great piece of kit.
BBC Model B 32k ICL issue 3, WE ROM/RAM board, Speech Processor, TurboMMC, PiTubeDirect
BBC Master 128
rodders
Posts: 89
Joined: Thu Jun 25, 2020 3:40 pm
Location: Somerset
Contact:

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

Post by rodders »

I think I've fixed the bottom line being cut off by tweaking the V Offset (32 for mode 7 and 36 for the others).
I've got some twinkling in mode 7 with a red background. This seemed to disappear at some points in the calibration but returned in the final result. Any suggestions?
BBC Model B 32k ICL issue 3, WE ROM/RAM board, Speech Processor, TurboMMC, PiTubeDirect
BBC Master 128
User avatar
IanB
Posts: 690
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 »

rodders wrote:
Fri Nov 27, 2020 12:02 pm
1) Integer scaling works great in modes 0-6 but in mode 7 most of the bottom line of text is cut off.
That's usually caused by the *TV setting on the beeb/master which shifts the picture up or down but I'm surprised it isn't cutting off modes 0-6.
If you are using a Master 128 check the CMOS RAM setting of *TV using *STATUS and if not *TV 0,0 you can change it with *CONFIGURE TV 0,0

If you want to leave the *TV setting unchanged so you can use the machine with other displays like a scart TV you can change the vertical offset value in the geometry menu to compensate for that instead as you have done.
rodders wrote:
Fri Nov 27, 2020 12:02 pm
Auto works fine but does not fill the screen.
When using interpolated scaling which is the new default for Auto with 1280x1024, you can zoom the image in a little by changing the crop border option in the Preferences menu which crops an adjustable amount off the border before scaling what's left which has the effect of zooming in the image. You may have to re-run the auto calibration in mode 7 to correct the pixel H offset after adjusting this setting.
rodders wrote:
Fri Nov 27, 2020 12:02 pm
2) Genlock is inhibited because the monitor is running at 60Hz, but the LED keeps flashing, is there any way to turn it off?
I assume you don't get an output when you try the 50Hz test option.
Go into the settings menu and change "Genlock Mode" to Off
rodders wrote:
Fri Nov 27, 2020 12:02 pm
The monitor I'm using is a Benq T905 which has a native resolution of 1280x1024@60Hz
1280x1024 isn't the best resolution to use with integer scaling because although it fits the beebs 640x256 nicely with 2x4 scaling the other modes have a slight horizontal shift to the right of different amounts so you end up with a few pixels cut off from the right hand edge of the screen. I intend to see if it's possible to automatically compensate for that shift at some point. This isn't a problem with other monitor resolutions like 1600x1200 or 1920x1080 because they capture a wider image so don't cut anything off.
rodders wrote:
Fri Nov 27, 2020 12:02 pm
I've got some twinkling in mode 7 with a red background. This seemed to disappear at some points in the calibration but returned in the final result. Any suggestions?
Try running the auto calibration again as it doesn't always get the best results first time due to sampling jitter and thermal drift in the beeb also if there are flashing teletext characters (except the cursor) that will mess up the calibration.

If that doesn't help try manually adjusting the phase settings in the sampling menu:
Set the multiplier to x12
Adjust the sampling phase for the best overall result then adjust the individual A-F Phases to see what effect they have on any remaining noise.
You can also change the half pixel shift setting and repeat the above if required.
Finally you can try again with the multiplier set to x16 which is even more accurate but that might not work as it overclocks the cpld so you might get streaking, blank screens or much more noise.

Don't forget to save the config if you get a good result.

The only other option is to try varying the resistors and capacitors in the 6 Mhz clock generation circuitry on the beeb to get the clock more symmetric.

It might be useful to post the log to see what the calibration is doing. Go to the info menu and use the save log option after running the mode 7 calibration a few times.
User avatar
anightin
Posts: 689
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 »

Many thanks for the latest software.

Found enough parts to build an RGB2HDMI Analogue RGB adapter for my Oric Atmos.

Worked first time and very pleased with the output, didn't even need any calibration. =D>
IMG_8227.jpeg
IMG_8226.jpeg
sfalvey
Posts: 13
Joined: Tue May 19, 2020 6:47 am
Contact:

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

Post by sfalvey »

Before I power my adapter up and ruin it can someone clarify that...

... there is no polarity on the resister arrays.

... Pin 1 of the six pin block connector is on the right as you look at the rear of the connector plug with locating key at the top.
User avatar
IanB
Posts: 690
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 »

sfalvey wrote:
Tue Dec 01, 2020 2:37 am
... there is no polarity on the resister arrays.
The resistor arrays are polarised with a common on pin 1 which is marked by a dot on the body and that goes into the hole with the square around it.
sfalvey wrote:
Tue Dec 01, 2020 2:37 am
... Pin 1 of the six pin block connector is on the right as you look at the rear of the connector plug with locating key at the top.
If you the mean the 6 way connector that clamps on the cable then yes that is correct and to confirm, the pin 1 end is marked with a faint little triangle moulded into the body of the plastic on both the plug & socket.
sfalvey
Posts: 13
Joined: Tue May 19, 2020 6:47 am
Contact:

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

Post by sfalvey »

The resistor arrays are polarised with a common on pin 1 which is marked by a dot on the body and that goes into the hole with the square around it.
One out of 2 wasnt bad - now where did I put my solder sucker.....
If you the mean the 6 way connector that clamps on the cable then yes that is correct and to confirm, the pin 1 end is marked with a faint little triangle moulded into the body of the plastic on both the plug & socket.
Ah yes I see it now.

Thanks Ian much appreciated.
rodders
Posts: 89
Joined: Thu Jun 25, 2020 3:40 pm
Location: Somerset
Contact:

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

Post by rodders »

That's usually caused by the *TV setting on the beeb/master
I had a Doh! moment with this one. I was using the menu screen from my TurboMMC card as a MODE 7 test and discovered that the !BOOT file had a *TV255!
I'm surprised it isn't cutting off modes 0-6.
After a bit more testing I realised that while it seemed to be OK in MODE 0 there is some truncation in MODES 4, 5 and 6 (you were right of course :wink: ) . There are separate offset values for MODE 7, would it be possible to have individual offsets for MODES 0-6?
Go into the settings menu and change "Genlock Mode" to Off
That worked fine, thanks.
If that doesn't help try manually adjusting the phase settings in the sampling menu:
I set the multiplier to x12 and the best sampling phase is 6 with a slight improvement when I set the B phase to 7. There is still a bit of twinkling on diagonals e.g. in M and N which I think I can live with rather than butchering the Beeb.
I've also attached a log file.
Thanks again for a great product.
Attachments
Log.txt
(18.12 KiB) Downloaded 12 times
BBC Model B 32k ICL issue 3, WE ROM/RAM board, Speech Processor, TurboMMC, PiTubeDirect
BBC Master 128
vela025
Posts: 27
Joined: Tue Jun 16, 2020 4:48 pm
Contact:

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

Post by vela025 »

Apologies if this has already been asked (I did spot checks at random intervals on the 43 pages of comments but couldn't see anything lol), are there any plans to sell these pre-assembled? [-o<
Post Reply

Return to “8-bit acorn hardware”