Atom Video to HDMI Adapter

discussion of games, software, hardware & emulators relating to the Acorn Atom and Acorn System machines.
User avatar
-B-
Posts: 137
Joined: Wed Nov 26, 2014 11:54 am
Location: Noordwijk ZH (NL) / Durham (UK)
Contact:

Re: Atom Video to HDMI Adapter

Post by -B- » Fri May 10, 2019 6:32 pm

How important is is that R2 and R4 are 1K1 1% and metal film?

Reichelt have sent me 7K5 in a bag marked up as 1K1.
I have some carbon film ones that I can put in series to get 1K1 until I reorder the proper ones.

Neil.
Atom | BBC Model A | BBC Model B | Electron | Olivetti PC128S.

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

Re: Atom Video to HDMI Adapter

Post by Elminster » Fri May 10, 2019 6:46 pm

Or put 9 of the 7.5k in parallel :) would miss the 1% tolerance though.

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Fri May 10, 2019 7:00 pm

-B- wrote:
Fri May 10, 2019 6:32 pm
How important is is that R2 and R4 are 1K1 1% and metal film?
These are fairly critical components, being part of a voltage divider.

You'll probably be OK with 5% tolerance as a temporary measure.

Or you could, I think, try 1.2K and 8.2K, as that's almost the same ratio.

Dave

User avatar
-B-
Posts: 137
Joined: Wed Nov 26, 2014 11:54 am
Location: Noordwijk ZH (NL) / Durham (UK)
Contact:

Re: Atom Video to HDMI Adapter

Post by -B- » Fri May 10, 2019 7:41 pm

It gets worse!
They have also sent me 10Mohm instead of 10K.

I've complained to Reichelt and asked for the correct parts.
That'll take them a few working days to sort out but I don't have my programmer yet so I can potentially wait.
That's dulled my excitement somewhat.

Neil.
Atom | BBC Model A | BBC Model B | Electron | Olivetti PC128S.

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Fri May 10, 2019 9:27 pm

-B- wrote:
Fri May 10, 2019 7:41 pm
It gets worse!
They have also sent me 10Mohm instead of 10K.
The three 10K resistors are just pull-ups on the push switches.

Any value between 1K and 22K should work fine.

User avatar
roland
Posts: 3381
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Atom Video to HDMI Adapter

Post by roland » Fri May 10, 2019 10:03 pm

I am happy to send you three resistors of 4.7k
256K + 6502 Inside
MAN WOMAN :shock:

User avatar
-B-
Posts: 137
Joined: Wed Nov 26, 2014 11:54 am
Location: Noordwijk ZH (NL) / Durham (UK)
Contact:

Re: Atom Video to HDMI Adapter

Post by -B- » Fri May 10, 2019 10:13 pm

roland wrote:
Fri May 10, 2019 10:03 pm
I am happy to send you three resistors of 4.7k
Its OK Roland, I'll wait until Reichelt sort out my order. Like I said before, I can't program the CPLD just yet anyway.

Here's the progress so far, just the HDMI hole to make, add 5 resistors, insert the comparators and get the right spacers for the Pi Zero to do....

IMG_4415.jpeg
IMG_4424.jpeg
IMG_4425.jpeg

Neil.
Atom | BBC Model A | BBC Model B | Electron | Olivetti PC128S.

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

Re: Atom Video to HDMI Adapter

Post by IanB » Fri May 10, 2019 11:04 pm

Mine started up first time:
atom.jpg
Unfortunately I don't have any Atom software accessible at the moment so I haven't been able to do any further testing.
I'll have to get the Econet setup properly as I don't have any other way of loading software.

I found an error in the BOM:
R6 and R7 are swapped, R6 should be 1K and R7 should be 430R

EDIT:
I typed in the test program in the wiki and successfully aligned the converter. Here's a screen capture from the Pi:
capture12.png
Last edited by IanB on Sat May 11, 2019 1:18 am, edited 2 times in total.

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Sat May 11, 2019 6:22 am

IanB wrote:
Fri May 10, 2019 11:04 pm
I found an error in the BOM:
R6 and R7 are swapped, R6 should be 1K and R7 should be 430R
Good spot, that's corrected now.

I really must figure out how to get KiCad to generate the BOM. I just need to find the right plugin I think.

And great that a second person has one of these working!

Dave

User avatar
roland
Posts: 3381
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Atom Video to HDMI Adapter

Post by roland » Sat May 11, 2019 6:41 am

hoglet wrote:
Sat May 11, 2019 6:22 am

I really must figure out how to get KiCad to generate the BOM. I just need to find the right plugin I think.
IIRC it's in PCBnew: File -> Fabrication output -> BOM
256K + 6502 Inside
MAN WOMAN :shock:

sparkyhall
Posts: 21
Joined: Sun Feb 17, 2019 8:29 pm
Contact:

Re: Atom Video to HDMI Adapter

Post by sparkyhall » Sat May 11, 2019 7:35 am

-B- wrote:
Fri May 10, 2019 10:13 pm
roland wrote:
Fri May 10, 2019 10:03 pm
I am happy to send you three resistors of 4.7k
Its OK Roland, I'll wait until Reichelt sort out my order. Like I said before, I can't program the CPLD just yet anyway.

Here's the progress so far, just the HDMI hole to make, add 5 resistors, insert the comparators and get the right spacers for the Pi Zero to do....


IMG_4425.jpeg

Neil.
I may be mistaken, but I think you have the CPLD round the wrong way :?

The chamfered corner should be to the top right in your picture.

Chris

User avatar
roland
Posts: 3381
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Atom Video to HDMI Adapter

Post by roland » Sat May 11, 2019 8:12 am

When I compare the pictures of Hoglet en -B- then it seems right to me:
Schermafbeelding 2019-05-11 om 10.09.43.png
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Sat May 11, 2019 8:15 am

sparkyhall wrote:
Sat May 11, 2019 7:35 am
I may be mistaken, but I think you have the CPLD round the wrong way :?

The chamfered corner should be to the top right in your picture.
You can see in Neil's picture here the location of pin 1 is marked with a circle (and a line extending out from the footprint):
IMG_4415.jpeg
On the CPLD, the corner with pin 1 is marked with a small dot, and with a chamfered corner.

So Neil has it the right way around (phew)!

Sparkyhall, what made you think that was incorrect? I want to make sure I've not written this down incorrectly somewhere.
Last edited by hoglet on Sat May 11, 2019 8:17 am, edited 1 time in total.

sparkyhall
Posts: 21
Joined: Sun Feb 17, 2019 8:29 pm
Contact:

Re: Atom Video to HDMI Adapter

Post by sparkyhall » Sat May 11, 2019 8:56 am

My sincerest apologies, I had my board the wrong way round when I compared the two and I hadn't drunk my coffee before posting. :oops:

Mines also built, I am also waiting for my programmer to arrive.

Chris

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

Re: Atom Video to HDMI Adapter

Post by anightin » Sat May 11, 2019 12:13 pm

Getting there, just a couple more resistors to fit when they arrive:
IMG_3486.jpeg
Hopefully not too many mistakes, if anyone can spot some then please comment :) I only had 5% resistors so will measure values before powering up. The ones I've ordered are 1%

Andy

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Sat May 11, 2019 1:02 pm

Important Note!!!

Everyone, do please check that you have R6 and R7 the correct way around: R6 is 1K0 and R7 is 430R.

IanB spotted that these were swapped in the BOM (which is now fixed). They always were correct on the schematic.

You can see them in this photo next to C4:
IMG_1666.JPG
R6 is the bottom one (1K0) and R7 is above that (430R)

They look incorrect in Neil and Andy's photos.

Dave

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

Re: Atom Video to HDMI Adapter

Post by anightin » Sat May 11, 2019 1:23 pm

Thank you Dave I was assembling as per earlier BOM

Best

Andy

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

Re: Atom Video to HDMI Adapter

Post by IanB » Sun May 12, 2019 2:05 am

All finished and cased up:

cased.jpg

I had to cut quite a large hole for the HDMI connector to accomodate the plastic body of the connector as well as the metal part because the case walls were too thick to allow the connector to mate properly
Last edited by IanB on Sun May 12, 2019 2:09 am, edited 1 time in total.

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Sun May 12, 2019 5:54 am

IanB wrote:
Sun May 12, 2019 2:05 am
I had to cut quite a large hole for the HDMI connector to accomodate the plastic body of the connector as well as the metal part because the case walls were too thick to allow the connector to mate properly
Yes, I had to do that as well.

On the plus side, it does give a bit of extra mechanical stability.

Dave

sparkyhall
Posts: 21
Joined: Sun Feb 17, 2019 8:29 pm
Contact:

Re: Atom Video to HDMI Adapter

Post by sparkyhall » Sun May 12, 2019 6:56 pm

Well, my programmer turned up yesterday so I was able to complete my Atom to HDMI adapter:
Atom_RGB-HDMI_All.png
Atom_RGB-HDMI_internals.png
I'm really pleased with the results, my atom screen has never looked so good, and this on a 1366x768 display.

One minor error on the build instructions is that C18 is listed as an 0805 instead of through hole.

Need to spend some time playing with the options now.

Thanks to all those who made this possible.

Chris

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Sun May 12, 2019 7:51 pm

Hi Chris,

Glad you got it working.
sparkyhall wrote:
Sun May 12, 2019 6:56 pm
One minor error on the build instructions is that C18 is listed as an 0805 instead of through hole.
Fixed now, thanks.
sparkyhall wrote:
Sun May 12, 2019 6:56 pm
Need to spend some time playing with the options now.
The display looks slightly squashed to me, so you might want to experiment with different aspect ratio setting on the TV. You don't want it set to 4:3!

Dave

User avatar
roland
Posts: 3381
Joined: Thu Aug 29, 2013 8:29 pm
Location: Born (NL)
Contact:

Re: Atom Video to HDMI Adapter

Post by roland » Sun May 12, 2019 8:00 pm

I just ordered the 0805 parts :shock:

Well, luckily they are not that expensive so that I have to cancel some projects :lol:
256K + 6502 Inside
MAN WOMAN :shock:

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Sun May 12, 2019 8:21 pm

roland wrote:
Sun May 12, 2019 8:00 pm
I just ordered the 0805 parts :shock:

Well, luckily they are not that expensive so that I have to cancel some projects :lol:
You still need three of them.

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

Re: Atom Video to HDMI Adapter

Post by IanB » Mon May 13, 2019 1:43 am

hoglet wrote:
Sun May 12, 2019 7:51 pm
The display looks slightly squashed to me, so you might want to experiment with different aspect ratio setting on the TV. You don't want it set to 4:3!
Yes, it looks like it's squashing the Pi's 16:9 output to 4:3 so check the aspect ratio setting on the tv/monitor. The other possibility is that the Pi is generating the wrong resolution in Auto mode.

There is a potential problem with the current Atom CPLD profile as it's more or less setup for a 1600x1200 monitor although the following suggestions won't help with the 1366x768 resolution of sparkyhall's monitor which is going to be restricted to 3x3 integer scaling.

With sources that have border colour like the Atom in graphics mode, to get the best results, the capture area should be an integer sub-multiple of the display area so the border colour fills the whole screen. This also applies to the ZX81 which effectively has a white border colour due to the inverted video and also applies to the PC screen modes like CGA and EGA but not beeb, electron or monochrome sources as they can't set a border colour.

So if you are using a 1920x1080 monitor which has a centre 4:3 area of 1440x1080 the capture area should be 288x216 and for a 1600x1200 monitor the capture area should be 320x240 (with H and V offsets adjusted to centre the image). In both cases that results in integer scaling of 5x5 that fills the 4:3 screen area entirely thus preserving the border colour while maintaining integer scaling. I created two ZX81 profiles to work around this so maybe the same should be done for the AtomCPLD. However, a better solution would be to auto adjust the profile capture area to compensate for different monitor resolutions so I will investigate if that's feasible.

Here are a few comparisons in clear 4:
1600x1200 with 320x240 capture area
This scales 5x5 and fills the screen.
1600x1200.png

1920x1080 with current Atom_CPLD capture area (304x240)
This scales 4x4 with black left around the border area
You can always switch to interpolated full screen scaling to get rid of the extra black border but that will soften the image
1080p-current.png

1920x1080 with 288x216 capture area
This scales 5x5 and fills the screen but has a reduced border
1080p-alt.png
Note that the screen is not perfectly centred horizontally as the Atom CPLD doesn't have the delay setting to provide pixel accurate horizontal adjustment. There may not be enough room for a general delay setting but perhaps a fixed pixel offset of 1 or 2 pixels could be added to the CPLD?
Last edited by IanB on Mon May 13, 2019 3:27 am, edited 5 times in total.

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Mon May 13, 2019 10:03 am

IanB wrote:
Mon May 13, 2019 1:43 am
There is a potential problem with the current Atom CPLD profile as it's more or less setup for a 1600x1200 monitor although the following suggestions won't help with the 1366x768 resolution of sparkyhall's monitor which is going to be restricted to 3x3 integer scaling.
When I chose 304x240 as a capture area, I didn't actually have a particular resolution in mind. What I was trying to replicate was the chunky green borders that you typically see on when an Atom drives a normal TV. And then, only approximately.

At 1280x720 it fills the screen vertically (with 3x scaling), similarly at 1600x1200 (with 5x scaling).

At other vertical resolutions, there will be some black borders.

I use this routinely at 1920x1080, where you get ~60 pixels above/below the image.

It's fine if people want to experiment with the geometry settings. We will get around to documenting these as some point. Honestly!

It's the "V Capture Height" that should be adjusted to eliminate the top/bottom border.
IanB wrote:
Mon May 13, 2019 1:43 am
However, a better solution would be to auto adjust the profile capture area to compensate for different monitor resolutions so I will investigate if that's feasible.
That would make a useful additional scaling option.
IanB wrote:
Mon May 13, 2019 1:43 am
Note that the screen is not perfectly centred horizontally as the Atom CPLD doesn't have the delay setting to provide pixel accurate horizontal adjustment. There may not be enough room for a general delay setting but perhaps a fixed pixel offset of 1 or 2 pixels could be added to the CPLD?
The Atom CPLD is pretty full, only one spare register.

Code: Select all

Function    Mcells      FB Inps     Pterms      IO
Block       Used/Tot    Used/Tot    Used/Tot    Used/Tot
FB1          18/18*      33/54       63/90       9/ 9*
FB2          18/18*      35/54       47/90       7/ 9
FB3          18/18*      32/54       76/90       9/ 9*
FB4          17/18       18/54       23/90       3/ 7
             -----       -----       -----      -----
             71/72      118/216     209/360     28/34
To be generally useful, we would need a 0-3 pixel delay which would take two registers.

Instead, I've just pushed a change that shifts the start of sampling over by one pixel. With this, the default profile is perfectly centered I think. There is an updated JEDEC file here:
https://github.com/hoglet67/RGBtoHDMI/b ... toHDMI.jed

Dave

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

Re: Atom Video to HDMI Adapter

Post by IanB » Mon May 13, 2019 12:22 pm

hoglet wrote:
Mon May 13, 2019 10:03 am
Instead, I've just pushed a change that shifts the start of sampling over by one pixel. With this, the default profile is perfectly centered I think. There is an updated JEDEC file here:
https://github.com/hoglet67/RGBtoHDMI/b ... toHDMI.jed
I just tried this and it looks like the video is now centred in graphics modes, however I'm seeing glitches on the right hand edge of text mode:

capture23.png

They vary in the amount and colour, sometimes green and sometimes yellow. They appear to be at the end of the active text area, not at the end of sampling.

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Mon May 13, 2019 1:06 pm

IanB wrote:
Mon May 13, 2019 12:22 pm
They vary in the amount and colour, sometimes green and sometimes yellow. They appear to be at the end of the active text area, not at the end of sampling.
Do they go away if you recalibrate? (Using a text screen)

I'm busy this afternoon, but I'll look into this later.

I have a hunch I know what's going on, it's to do with the way the colour difference signals are sub-sampled. Adding a 1 pixel offset will shift the optimal colour sampling point into the 8-15 region.

Dave
Last edited by hoglet on Mon May 13, 2019 1:11 pm, edited 4 times in total.

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

Re: Atom Video to HDMI Adapter

Post by IanB » Mon May 13, 2019 1:14 pm

hoglet wrote:
Mon May 13, 2019 1:06 pm
IanB wrote:
Mon May 13, 2019 12:22 pm
They vary in the amount and colour, sometimes green and sometimes yellow. They appear to be at the end of the active text area, not at the end of sampling.
Do they go away if you recalibrate? (Using a text screen)
I have a hunch I know what's going on, it's to do with the way the colour difference signals are sub-sampled. Adding a 1 pixel offset will shift the optimal colour sampling point into the 8-15 region.
Yes, the optimum value has changed from 1 to 9
During calibration similar glitches are seen at the left hand side as well

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

Re: Atom Video to HDMI Adapter

Post by hoglet » Mon May 13, 2019 5:53 pm

IanB wrote:
Mon May 13, 2019 1:14 pm
Yes, the optimum value has changed from 1 to 9
During calibration similar glitches are seen at the left hand side as well
I've just pushed another Atom CPLD version (v2.4) that adjusts the colour sampling point so the optimal value is back in the 0-7 range. This means the previous profile should work unchanged. So please give that a try.

Some background... It's possible (and beneficial) to sub-sample the chrominance signals by a factor of two. That's because the highest resolution colour mode (128x192) is half the resolution of the the highest resolution monochrome (256x192). I'm currently taking the chrominance sample exactly half way between the two luminance samples, as some earlier tests suggested this worked well. There is possibly scope for further optimising this, but unless anyone reports issues I'm not going to try.

Dave

sparkyhall
Posts: 21
Joined: Sun Feb 17, 2019 8:29 pm
Contact:

Re: Atom Video to HDMI Adapter

Post by sparkyhall » Mon May 13, 2019 6:38 pm

hoglet wrote:
Sun May 12, 2019 7:51 pm
Hi Chris,

Glad you got it working.
sparkyhall wrote:
Sun May 12, 2019 6:56 pm
One minor error on the build instructions is that C18 is listed as an 0805 instead of through hole.
Fixed now, thanks.
sparkyhall wrote:
Sun May 12, 2019 6:56 pm
Need to spend some time playing with the options now.
The display looks slightly squashed to me, so you might want to experiment with different aspect ratio setting on the TV. You don't want it set to 4:3!

Dave
You're spot on, TV was set to 4:3, now I have set it to 16:9 it looks much better.

Chris

Post Reply