Atom Colour Board Thread

emulators, hardware and classic software for atom + system machines
User avatar
sPhilMainwaring
Posts: 298
Joined: Tue Jan 15, 2013 7:57 pm
Location: Mid Wales
Contact:

Re: Atom Colour Board Thread

Post by sPhilMainwaring » Mon Feb 11, 2013 10:31 am

That's a great display Dave :-)

Sorry it's taking me a while to respond and many thanks for the amazing photo's. I know you don't think it's the way to go but for what it is that I'm looking to do I think they couldn't be more perfect!

I haven't forgotten about the Atom manual and PSU plugs either it's just I'm back and forth between my place and my parents as an old school friend is in the midst of a double family tragedy

I'll reply properly as soon as I can but for now thanks again :)

Phil

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Feb 24, 2013 11:44 am

I've had a bit of time now playing around with the FPGA board, and and starting to get some reasonable results.

Here's a block diagram of the FPGA design in it's current form.
fpgaBlockDiagram.png
fpgaBlockDiagram.png (30.08 KiB) Viewed 2585 times
The general idea is to generate a pixel clock at 4x the speed at which the atom generates pixels, which allows very fine control over when to sample the atom video signals. Although this clock is asynchronous to the 6847 clock (it's generated from a crystal on the FPGA board), the sampling state machine is re-synchronized at the start of each line to the falling edge of HS. A set of DIP switches allows the sampling point of the L and PA/PB signals to be tuned experimentally, to find a point where the signals are stable and least impacted by crosstalk.

The sampled pixels are written into an dual port RAM embedded dual port RAM. The size of this RAM allows a whole atom frame to be buffered (256x192) and the value written is a 4 bit value representing the colour. This RAM allows the VGA clock to be completely independent of the atom clock.

On the VGA side, the VGA state machine reads the pixel data out of the dual port RAM, and generated an 8 bit RGB signal, plus VSync and HSync. A latter DAC (basically just 8 resistors) outside of the FPGA. Each Atom pixel is output as a 2x2 block of VGA pixels.

I had not originally planned to buffer a whole frame, but it actually simplified the design, allowing all the clocks to run independently.

Here are some snaps of it working...
IMG_0117.JPG
IMG_0117.JPG (441.54 KiB) Viewed 2585 times
IMG_0118.JPG
IMG_0118.JPG (784.01 KiB) Viewed 2585 times
And for comparison, here is the earlier design plus the GBS 8200.
IMG_0122.JPG
IMG_0122.JPG (553.69 KiB) Viewed 2585 times
IMG_0124.JPG
IMG_0124.JPG (866.5 KiB) Viewed 2585 times
The blurriness you see is a result of the GBS 8200 mis-sampling the atom pixels.

In general, this design seems much more immune to noise/crosstalk on the video signals output by the atom.

User avatar
oss003
Posts: 3300
Joined: Tue Jul 14, 2009 12:57 pm
Location: Netherlands
Contact:

Re: Atom Colour Board Thread

Post by oss003 » Sun Feb 24, 2013 1:38 pm

Ok, Dave ..... nice result, great job!! =D> =D>

Is screen-noise also eliminated now?
Does the FPGA also work if the CPU runs at 1,79 MHz or even 2 MHz?

Greetings
Kees

Prime
Posts: 2864
Joined: Mon Jun 01, 2009 12:52 am
Contact:

Re: Atom Colour Board Thread

Post by Prime » Sun Feb 24, 2013 2:36 pm

oss003 wrote:Ok, Dave ..... nice result, great job!! =D> =D>

Is screen-noise also eliminated now?
Does the FPGA also work if the CPU runs at 1,79 MHz or even 2 MHz?
Indeed good job,

I would think it would work at whatever speed the cpu was running at, as it only takes it's inputs from the inputs of th 6847.

I did experement with the noise killer on the colour board, and with the correct timing cap it did work....

Cheers

Phill.

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Mar 10, 2013 1:44 pm

I managed to find some time yesterday to etch and assemble the Atom VGA Wing for the Papilio One, that I breadboarded a couple of weeks ago:
IMG_0150.JPG
IMG_0150.JPG (456.5 KiB) Viewed 2517 times
Here's another with the two boards plugged together:
IMG_0157.JPG
IMG_0157.JPG (386.49 KiB) Viewed 2517 times
There are a few improvements to the design:

- I tweaked the clock generation to get a more accurate VGA clock: 32 x (25/18) * (13/23) = 25.121MHz.

- I added a proper back-porch clamp circuit to restore the black level of the luminance signal. The FPGA generate a signal timed to occur during the "back porch" part of the video signal (which should always be black). This signal switches on a 74LVC1G66 analog switch to force the black level to a reference level. The end result is a bit more margin when sampling the luminance signal, and more consistency across modes.

- In the FPGA, I added majority voting (2 of 3) to each of the inputs (L, AL, AH, BL, BH), which is possible because the signals are being oversampled at four times the pixel clock. This has made a big difference to the noise immunity, and the end result is pretty much artefact free.

I'm really happy with the way this is working now and so I'll probably leave it at this for a while.

Longer term, I'd still like to try to avoid buffering a whole frame, so that it might be possible to fit this into a much smaller FPGA. To do this, the VGA timing has to be "gen locked" to the Atom timing, rather than free running. This is usually done using an external VCO and PLL to continuously adjust the VGA clock. I've got an idea about how to do this completely digitally, by varying the VGA frame length between 524 and 525 lines. I've verified that this doesn't cause my monitor to loose sync, and this should give enough adjustment to keep things locked.

I'm thinking of going to Wakefield, so I might bring this (and some of the earlier attempts) along if anyone is interested.

Dave

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Mar 10, 2013 1:48 pm

oss003 wrote:Is screen-noise also eliminated now?
Does the FPGA also work if the CPU runs at 1,79 MHz or even 2 MHz?
Hey Kees, sorry I missed this question earlier.

Screen noise is eliminated if:
a) The CPU is run a 1.79 MHz, or
b) Phill's video board is used as a noise killer.

BTW: The FPGA clocks are completely independent of the CPU clock.

Dave

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Mar 10, 2013 3:18 pm

I was asked off-list for more details about one of the earlier configurations I tried - a GBS-8200 connected with its component video inputs (Y Pr Pb) driven from PL4 via a couple of transistors.

This is the schematic:
AtomSimple.png
Here's it breadboarded:
IMG_0136.JPG
And here are a couple of screen shots:
IMG_0129.JPG
IMG_0133.JPG
This is the simplest way that I know of to get colour output from an Atom to an LCD monitor, because no colour card is necessary.

The downside is that the colours are not very accurate, the output is a not particularly sharp, and there is quite a bit of noise visible.

Dave
Last edited by hoglet on Mon Mar 27, 2017 8:18 am, edited 3 times in total.

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Mar 10, 2013 7:59 pm

This latest board is the first one I've done with any surface mount (a SOT-23):
P1010395-1.JPG
P1010395-1.JPG (331.28 KiB) Viewed 2491 times
The trace running between the connector pads is 0.013" (0.33mm) :shock:
P1010395-2.jpg
P1010395-2.jpg (317.42 KiB) Viewed 2491 times
All quite exciting really :D

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

Re: Atom Colour Board Thread

Post by sPhilMainwaring » Sun Mar 10, 2013 8:14 pm

Hey Hoglet

Message in PM for you

Lovely neat solder work d00d =D>

Phil :)

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

Re: Atom Colour Board Thread

Post by sPhilMainwaring » Mon Mar 11, 2013 12:15 pm

hoglet wrote:The downside is that the colours are not very accurate, the output is a not particularly sharp, and there is quite a bit of noise visible
I hadn't thought of this when I suggested an LCD display. Essentially text on an LCD display is like a huge .jpg of an image which should have been stored as a .gif (this is most pronounced at the end of a TV program with scrolling text - which is essentially what you have with computer output - where you get "blocks" of black that are very close, but not identical to, neighbouring blocks). There's no way around this when displaying computer text via an *analogue* input on an LCD as far as I am aware

I have of course assumed that you mean noise in the sense of jpeg artifacts rather than noise in the "Atomic snow" sense though ... apologies if I've mis-understood

Phil :)

Prime
Posts: 2864
Joined: Mon Jun 01, 2009 12:52 am
Contact:

Re: Atom Colour Board Thread

Post by Prime » Mon Mar 11, 2013 1:38 pm

hoglet wrote:This latest board is the first one I've done with any surface mount (a SOT-23):

All quite exciting really :D
Looks good so far :)

For most of my boards I use 0.12" traces for normal tracks and 0.16" or wider for power.

Just one suggestion, if you are using chemical etching you might want to use a copper polygon to fill in the spaces where there are not tracks, this way you just etch copper for a small distance either side of the track.

The practical upshot of this is that you have much less to etch and so your chemicals will last longer as you are not etching stuff you don't need to.

This https://www.facebook.com/photo.php?fbid ... =3&theater is what I mean :)

Cheers.

Phill.

Prime
Posts: 2864
Joined: Mon Jun 01, 2009 12:52 am
Contact:

Re: Atom Colour Board Thread

Post by Prime » Fri Aug 30, 2013 12:00 am

Sorry for resurrecting this thread.....

Been working on a new design, based on a combination of the Acorn / Hoglet design, and the Dutch colourboard design.

I've used the Acorn method of separating the colours using comparators which are then fed into a 22v10 PAL like Hoglet's design, however I found that extracting the sync worked better if I used an LM1881 sync separator. I've also got instances of the L signal level fed into the PAL, one that is used when in text or mono modes, and the other that is used in colour modes.

The output from the PAL is latched as in the Dutch design, the clock for this is generated from a 14.32MHz crystal & LS04, and then divided by an LS393 to give 7.16MHz & 3.58MHz. The 3.58MHz is also used as the clock for the 6847, and pin 10 of IC9 on the main board lifted out of it's socket to disconnect it.

The A/G and GM0 signals from the 6847 are fed into the PAL and used to select the correct latch clock and L signal to use depending on mode.

I currently have the PAL driving the output directly.

The results at least on my LCD TV (via a SCART cable with resistors), are pretty good, very crisp text in text mode, the mode 4 screen of the Atom software collection is very crisp also. The colour screens are also good too, with much brighter colours than the previous board.

I've got a Mk 4.1 version of the colour board laid out, I want to make a couple of prototypes for testing, if successful I may consider having a batch made.

Observations.

For pure TTL RGB it will be impossible to re-produce orange, as it would always be red.

Just uploaded some pictures here :
https://www.facebook.com/media/set/?set ... 2e1a48ee03

Cheers.

Phill.

User avatar
Garrettimus
Posts: 1004
Joined: Tue Feb 13, 2007 9:50 am
Location: Sao Paulo, Brazil
Contact:

Re: Atom Colour Board Thread

Post by Garrettimus » Fri Aug 30, 2013 12:17 pm

Great news! I'd like to have one. :D

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Oct 13, 2013 10:19 am

Hi all,

I'm going to have another go at a modern VGA video adapter for the Atom. I've been thinking about this for a while, but actually talking about it on here might motivate me to get started.

I'm planning on using one of the OHO Electronik GODIL FPGA Modules:
oho-elektronik-godil40xc3s250e.jpg
oho-elektronik-godil40xc3s250e_bottom.jpg
http://shop.trenz-electronic.de/catalog ... anguage=en

These cost about £50, so are not cheap, but they have some really nice features:
- designed for 40 pin DIL IC replacement
- based on a Xilinx XC3S250E FGPA, which includes 24KB Dual Port RAM
- include level shifters, so compatible with 5V I/O
- power and ground can be supplied from any pins on the 40 pin DIL header

The idea would be to completely replace the existing 6847 and video RAM with one of these plugged directly into the 6847 socket (IC31). The FPGA would be generating a VGA compatible video signal directly.

The embedded dual port RAM is key to this. Port A of this would be mapped into the Atom address space at 8000-9FFF, and would be readable and writeable as normal RAM. Port B would then be used to drive a reimplementation of the 6847 modified to generate a 640x480/60Hz VGA signal. There is a good starting point for this here:
https://svn.pacedev.net/repos/pace/sw/s ... mc6847.vhd

There are two options to get the VGA signal out:

1) Re-purpose some of the pins on PL4 that come directly from the 6847 - specifically pins 3 (OA), 4 (INV), 6 (CB), 7 (OB), 8 (HS), and used these for R, G, B, VS and HS. Doing this, we would end up with 1 bit RGB. (Link LK4 on the Atom would need to be removed to free up INV)

2) Use the 9 pin test connector on GODIL module. This gives an additional 7 outputs, and so with a small PCB (just 6 resistors) we could increase the bit depth of R,G,B to 2 bits each, giving 64 possible colours:
512px-6-bit_RGB_uniform_palette_with_black_borders.jpg
I'm trying to think of any gotchas. I've only thought of one so far: There is no NWDS (Write) signal on IC31, so this would need to be picked up from somewhere else. I was thinking this could be fed into the GODIL module on pin 36 (RP) which is not connected on the Atom PCB.

What's nice about this is the possibility of adding some new screen modes. For example, we could add some nice 40 column or 80 column text modes, with teletext graphics, programmable colour palette, hardware scrolling, etc.

I think my next step will be to start the design, just to make sure it's going to fit into a XC3S250E.

Would anyone else be interested in one of these if it were successful?

Anyone got any other thoughts about this?

Dave

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

Re: Atom Colour Board Thread

Post by danielj » Sun Oct 13, 2013 10:44 am

Oh, go on then :D

User avatar
TheCorfiot
Posts: 671
Joined: Mon Jan 08, 2007 5:22 pm
Contact:

Re: Atom Colour Board Thread

Post by TheCorfiot » Sun Oct 13, 2013 10:53 am

Dave

You may wish to to talk with Andy Key of Memotech fame.
He based his Rememorizer add on this Godil and used it to emulate an 80 column screen, sd device, and ram management..basically. an FDX system on a card...


http://www.nyangau.org/rememorizer/rememorizer.htm


But yes, this is the way to go......nice powerful device.

User avatar
oss003
Posts: 3300
Joined: Tue Jul 14, 2009 12:57 pm
Location: Netherlands
Contact:

Re: Atom Colour Board Thread

Post by oss003 » Sun Oct 13, 2013 11:05 am

hoglet wrote:Would anyone else be interested in one of these if it were successful?

Anyone got any other thoughts about this?

Dave
Hi Dave,

sounds good, I want one .....!! =D>

Are you still implementing RF out otherwise you can also use pin 28 for I/O?

It's a pitty that Keith Howell doesn't want to publish his code. He had a good working FPGA 6847 with some nice features like mouse support, palette- and font selection.

http://www.acornatom.nl/sites/Fpga/acor ... roject.htm

Greetings
Kees
Last edited by oss003 on Sun Oct 13, 2013 12:03 pm, edited 1 time in total.

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Oct 13, 2013 11:31 am

Hi all,

TC, thanks for the REMEMOizer link. I hadn't come across this before. It's a good proof point that it can drive a VGA Cable (those level shifters do reduce the current it can source)

Kees, that's a good suggestion, as I wasn't planning to implement RF/Composite, mostly because this would require more external circuitry. I'm trying to minimize the mods that are required to the Atom itself, ideally just a drop in replacement for the 6847 plus one flying lead forth NWDS.

I'll have a play with that mc6847 vhdl design with my Papillio board, and see if I can get it doing anything remotely 6847 like.

It's a shame Keith won't publish his work, it's really impressive what he's done.

Dave

User avatar
oss003
Posts: 3300
Joined: Tue Jul 14, 2009 12:57 pm
Location: Netherlands
Contact:

Re: Atom Colour Board Thread

Post by oss003 » Sun Oct 13, 2013 12:02 pm

Hi Dave,

I think using more then 4 colours will be a problem because the colourmodes of the 6847 are based upon 2-bit coloured pixels. Choosing colours out of a palette could be an option but displaying more then 4 colours will be very difficult.

An idea would be to write one colourbit in video-RAM bank 0 and write the other colourbit into video RAM bank 1. This way you have MODE 5 (256x192 with 4 colours). With 3 RAM banks MODE 6 (256x192 with 8 colours).

Greetings
Kees
Last edited by oss003 on Sun Oct 13, 2013 12:06 pm, edited 1 time in total.

User avatar
AlanD
Posts: 241
Joined: Fri Jan 09, 2009 8:30 pm
Contact:

Re: Atom Colour Board Thread

Post by AlanD » Sun Oct 13, 2013 12:04 pm

Hello Hoglet

i think everything you want exists in my atom FPGA "6847 with vga output"

if you want my atom fgpa just say and i will send it or post it

AlanD

edit that is the 6847 i started with i had to add the address bus generation and make a few other minor tweaks

edit added atomfpga sources
atomfpga.zip
(3.71 MiB) Downloaded 111 times

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Oct 13, 2013 12:13 pm

AlanD wrote:i think everything you want exists in my atom FPGA "6847 with vga output"

if you want my atom fgpa just say and i will send it or post it
Yes please Alan, as long as you don't mind bits of it being republished. No point re-inventing the wheel here.

Dave

User avatar
AlanD
Posts: 241
Joined: Fri Jan 09, 2009 8:30 pm
Contact:

Re: Atom Colour Board Thread

Post by AlanD » Sun Oct 13, 2013 12:17 pm

Hello Hoglet

do as you please with it

you will recognise things like the t65 and 6522 cores they are old and tweaked versions

have fun

Aland

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Oct 13, 2013 5:27 pm

Thanks ever so much Alan.

I was about to dive in to the MC6847 design and add back in generation of the complete 13 bit video address, but it looks like that was the main change you had to make as well.

Here's the MC6847 extracted from your "Atom in FPGA" running in a simple loopback test harness on my Papilio board:
IMG_0318.JPG
IMG_0319.JPG
One thing I noticed was that with the original 14.31818 MHz pixel clock I was getting very uneven character widths. I've updated the horizontal timings to allow it to run from a 12.5875 MHz pixel clock, which is exactly half the normal VGA clock. This means that one Atom pixel will map to two exactly VGA pixels. This looks much cleaner, but reduces the size of the borders a bit.

Again, a bit thank you for helping here!!

Dave

User avatar
AlanD
Posts: 241
Joined: Fri Jan 09, 2009 8:30 pm
Contact:

Re: Atom Colour Board Thread

Post by AlanD » Sun Oct 13, 2013 6:32 pm

[*]

Hello Dave

Good to see got it up and running with no problems =D>

I had thought about changing the clock but had left it in case i felt like building a composite video version

AlanD

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Oct 13, 2013 8:02 pm

OK, so I could't resist trying out Alan's complete "Atom in FPGA" project.

I had to make some changes to make it compatible with my Papilio One
- change the external clock to 32MHz
- use 16KB internal RAM for program memory and remove the external RAM
- invert the reset signal
- change the pinout to be compatible with the Papilio Arcade Wing

But bugger me if it didn't work first time:
IMG_0320.JPG
Just need to wire up an SDCARD now, and I'll try out the Atom Software Archive.

Well chuffed!!!!

And well done Alan for an amazingly clean design!!! =D> =D> =D>

Dave

User avatar
AlanD
Posts: 241
Joined: Fri Jan 09, 2009 8:30 pm
Contact:

Re: Atom Colour Board Thread

Post by AlanD » Sun Oct 13, 2013 8:25 pm

Hello Dave

good work =D> =D> =D>

AlanD

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

Re: Atom Colour Board Thread

Post by roland » Sun Oct 13, 2013 9:55 pm

It's really amazing what yo can do with those fpga's. I wish I understand it...
The idea of a 6847 replacement is attractive, with more colours and 80 columns graphics.

Keep up this interesting work!

Roland
FPGAtom: 512 KB RAM, Real Time Clock and 64 colours
MAN WOMAN :shock:

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Oct 13, 2013 10:25 pm

Continuing the off topic Atom FPGA discussions in the proper thread....

http://www.stardot.org.uk/forums/viewto ... f=3&t=6313

Dave

Keith
Posts: 10
Joined: Tue Mar 26, 2013 1:07 am
Contact:

Re: Atom Colour Board Thread

Post by Keith » Sun Oct 13, 2013 10:36 pm

Hi chaps, Kees alerted me to the goings on here and it is good to see people still interested in the Atom. I've been working 12-hr days since Dec. 2005 so hobby time went into stasis. On the good news front the last 8 years have been as profitable as 16 normal years, and it no longer looks like I will be eating cat food when I retire. :-)

More good news is that the evening job ends this Christmas and I will be back on the hobby scene with a to-do list that needs a spreadsheet!

I guess it was inevitable that someone else would have implemented the Atom in FPGA. It has VGA output but analogue displays underwent mass extinction. The asteroid impact of HDTV LCD tellies means the Atom will have to evolve - or die.

It could drive HDMI interfaces but gigabit serial links are not easy amateur projects.
I feel that the better option is to explore the portable niche, where the boom in mobile computing means you can get replacement displays for smart phones relatively cheaply.

Regarding ghosting etc. in analogue circuits, I can recommend Clarence Dyson's pages for correcting the Atari video circuitry. Essentially, a simply resistor DAC as used on the Arcade Megawing is pretty inadequate. You need well-designed circuitry to drive a video signal.

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

Re: Atom Colour Board Thread

Post by hoglet » Sun Oct 13, 2013 10:58 pm

Hi Keith,

Thanks for popping in.
Keith wrote:Regarding ghosting etc. in analogue circuits, I can recommend Clarence Dyson's pages for correcting the Atari video circuitry. Essentially, a simply resistor DAC as used on the Arcade Megawing is pretty inadequate. You need well-designed circuitry to drive a video signal.
I'm not sure I agree with this - with a 1/2 VGA speed pixel clock (12.58 MHz) the picture I'm getting from the Arcade Megawing is very good indeed, far better than I have ever seen from a real Atom.

Dave

Post Reply

Return to “acorn atom and acorn system series”