AVR324 Doing 720x480 VGA with only Logic Chips.

Go To Last Post
31 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 2

Long story condensed...

I am building a full featured 8 channel synthesizer with a built in operating system, tracking software, 40KHz sampling rate, waveform generator, and live keyboard input.

The best part is that it will be completely build with nothing more than 7400 logic chips and op amps (current parts, but available back in 1980).

The only other IC (out of probably 500+ ICs) that is not 7400 logic or SRAM will be a 6502 processor!

Also, every 7400 chip used is still in current production and in DIP form.

 

For now, I am doing all testing with an ATMega324.

The 40 pin chip burried under bus wiring at the top right of the board is the AVR324...

 

 

The bare bones 640x480 dual buffer VGA Generator - 100% Logic.

 

Here is a test frame, with a single Sprite being bit banged directly by the little AVR. The AVR writes to the "Back Buffer", waits for a Horizontal pulse, and then issues a command to "Flip" the buffers. This results in seamless and flicker free animations and refreshing. An old friend from my past moving around the screen...

 


Graphics look nice and crisp in 640x480

 

Originally, I thought 640x480 with 256 colors may be too much to do all with 74HC logic chips, but I managed 720x480...

 

HD Video from 1980's era components... Hell Yeah!

 

Here is a quick video showing a bunch of Logic Chips doing 640x480 VGA...

 

https://youtu.be/PDPH3IS0Uhg

 

I will soon be removing the AVR to plug in the 6502, but for now this is still an AVR project!

Will also be adding a high speed Blitter all made in logic, since HD VGA is a lot for an 8 processor to manage.

If I could choose only one uC platform, it would still be AVR, even after my recent trip to the Dark Side.

 

Cheers,

Brad

 

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Thu. Jun 2, 2016 - 12:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

We are unworthy.

 

Glad to see you posting again.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:

We are unworthy.

 

Glad to see you posting again.

 

Thanks, you crack me up!

All of this is easy enough to do... it just looks difficult!

A castle is just a bunch of bricks arranged properly.

 

Yeah, I am so busy on the Homestead, that my basement hacking lab only gets me on a the odd rainy day.

Looks like a few more days of rain, so I may get the next 50 ICs (for the blitter) hooked up and working.

 

Brad

 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Brad,

 

everything is easy once you know how it works.......

 

I thought you had finished the video side and were now concentrating n the audio. I might have missed some things as I have been very busy lately, but did you finish on that too in hte end? or is that part shelved again to continue working on the video ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

I will be posting in more detail on the 6502.org site, but here is the short version...

 

- I decided to rip up the entire project and make an Music Station instead.

- Vulcan-74 will be reborn as an 8 Track Sequencer with Piano keyboard input.

- There will be some analog component (1980's op amp filters) controlled digitally.

- Everything will still be 100% 7400 logic with SRAM and one or more 6502s.

- A custom OS will be made to handle the new improved VGA display and interface.

- Absolutely no connections to the modern world. Everything will be self contained.

- My IC estimate jumped from about 250 to well over 500 now! Need bigger boards!

 

When complete, it will be fully hand wired, put in a cabinet, and made into a functional Music Station.

I intend to enjoy it for decades. It will be like having my old Moog, Ensoniq, and Korg back again!

 

640x480 VGA and 8 tracks of 44KHz real-time analog / digital music all coming from a bunch of 7400 logic chips!

... it can't get more retro than that!

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice. Is the sound side your own design or based on something like the ones in the Hal Chamberlin book?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

But then you'll decide to rip it up and do something even crazier.

The largest known prime number: 282589933-1

It's easy to stop breaking the 10th commandment! Break the 8th instead. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:

Nice. Is the sound side your own design or based on something like the ones in the Hal Chamberlin book?

 

I don't recommend this approach to anyone, but when I take on a large project like this, I like to jump in without knowing what others have done, or what is considered "the norm". This will be 100% pure trial and error, based on my design goals, which are certainly lofty for 1980's era logic chips!

 

I did snoop around on various synth sites, and will probably model my Low Pass Resonant Filter loosely off the known "Buchla" designs, but one thing I intend to do radically different is... no Vactrols. I have found a digital workaround.

 

I am just cleaning up the 640x480 generator now, and intend to start a detailed build log with schematics, photos and videos on this site soon...

http://www.vulcan74.com

 

I have 200 photos and many pages of text done already, so now I need to make proper schematics for what is completed.

I often build "on the fly", and sometimes forget what I even did on earlier circuitry. With 500+ ICs, this becomes a nightmare for rebuilding.

 

Cheers,

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Sun. Jun 5, 2016 - 05:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Torby wrote:

But then you'll decide to rip it up and do something even crazier.

 

Typically this is all too true!

Boredom sets in for me as soon as the difficult parts are accomplished.

 

But this project is different, as my goal is more than simply bragging rights.

I want a functional Music Station that I can enjoy.

I like using Renoise and my digital synth, but can't deal with using anything that I didn't build from scratch.

So Vulcan-74 will combine what I like with both items so I can kick it... old school!

 

Brad

 

 

 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Another Test Video...

 

https://youtu.be/Ad_75NOXblI

 

 

Almost looks like an Amiga advertisement now!

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

take a look at this for ideas, or whatever it's worth (plays both poly music and video)...both projects are pretty amazing undertakings

 

https://www.youtube.com/watch?v=sNCqrylNY-0

 

 

 

 

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Using modern memories is cheating! I had to slave wiring up large memory arrays in the day. 64k x 1bit drams were state of the art, so the frame buffer will need a few.

Last Edited: Mon. Jun 6, 2016 - 08:03 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but you can't get those anymore. (and for display's it's not a problem refresh.)

 

But for the old days  , I have a board with 72000 beads (36000 on each side).

 

Add:

And my first computer (a PET), only had standard components, (about 70 TTL chips as I remember), all the RAM (8k+1K) was made with 2114 RAM.

Last Edited: Mon. Jun 6, 2016 - 11:39 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

PET 4016... my first.

And like many things from that era, it was built well enough to still work today...

 

 

One of my rules for building Vulcan was to only choose parts that were available in 1984, and still readily available now.

I allowed the use of modern speed equivalents as long as functionality was the same.

So SRAM can be 15ns rather than 150ns, and all 7400 logic is HC rather than LS.

Actually, if you had unlimited funds, similar components were available at the time, just out of reach of mortals.

 

I will post my detailed design goals / rules one of these days when I have time!

 

Brad

 

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Megabit 15ns rams would've made my life a bit easier back then. Wiring up arrays of memory was no fun. I helped a friend build a bipolar 32 bit processor and it had 64k x 128bits of microcode built from inmos 45ns 1k x 4 rams. I built a 32 x 32 parallel multiplier. There was a few F series adders.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Funny that computer wasn't called called a PET here, it was call CBM.

The only PET was the 8K (perhaps some 4k but I have not seen one), with the small keys, and the tape recorder left to the keys. And white monitor.

And I guess that it has 16 x DRAM 4116 

 

Does it have the "tail" error on the monitor? (white chars next to each other have a very small black line, because of the different timing at char shift).

Last Edited: Mon. Jun 6, 2016 - 01:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
Megabit 15ns rams would've made my life a bit easier back then. Wiring up arrays of memory was no fun. I helped a friend build a bipolar 32 bit processor and it had 64k x 128bits of microcode built from inmos 45ns 1k x 4 rams. I built a 32 x 32 parallel multiplier. There was a few F series adders.

 

I started Vulcan using 32K SRAMS, but gave myself some leeway with the 512K when I realized I would need 320 of them for the final design! Yes, I will be using 10MB of SRAM in this board.

Just to see if it could be done, I tested a 256K stack made of 32K SRAMs in the video generator...

 

 

I managed to pull 20MHz from the stack, which adds the propagation delay of the 3-8 decoder in the mix. Not too bad.

 

At this point, I believe that getting 640x480 (25.175MHz pixel clock) is the absolute limit for a logic based design.

I am running all ICs at their absolute "legitimate" ratings, and don't plan to steer outside the safety window.

 

This is actually respectable considering even using a Spartan-6 FPGA with external SRAM only gave me 40Mhz bandwidth (800x600).

If anyone has seen an example of more than 640x480 with 256 colors (not mono using a shift register) being done in logic, let me know!

 

I am now building the Blitter section, and will use the same AVR to run tests.

After that, Vulcan-74 gets handed over to a 6502.

 

Brad

 

 

 

 

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Mon. Jun 6, 2016 - 03:08 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It reminds me of how I added 512K to my atari 520.

 

made a stack of 16 DRAM, with most of the connections to one existing RAM and (as i remember) 3 wires for the 2. bank out from the mmu. I had an old version without a TV modulator build in so I placed the RAM there. and it booted as a 1040, but with some small black spots in the picture, just one cap onthe top like you have it made it stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you make your RAM banks interleaved you can speed it up :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sparrow2 wrote:

If you make your RAM banks interleaved you can speed it up :)

 

I tried that once with some success.

Pushed 2 SRAMs out at 20MHz and then had a 74HC157 Data Selector switching them on the Hi/Lo clock.

This essentially gave 40MHz output for the 800x600 standard, but there were several other issues.

Also tried splitting the output into Nibbles, but I can't roll with 16 colors!

 

After many experiments, I have decided that 640x480 is the limit with the largest and fastest SRAM available (512K @ 10ns).

A larger SRAM would up this limit, but I can't find one that would be breadboard friendly.

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Mon. Jun 6, 2016 - 04:57 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 157 solution probably glitched giving video artifacts - assuming you have a register on the ram output, going to 16 bit wide memory would mean another pipeline register in the chain and use the output enable of the ram registers to select hi/lo. Or you might be able to work the oe signal of the rams and eliminate two octal registers.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Kartman wrote:
The 157 solution probably glitched giving video artifacts - assuming you have a register on the ram output, going to 16 bit wide memory would mean another pipeline register in the chain and use the output enable of the ram registers to select hi/lo. Or you might be able to work the oe signal of the rams and eliminate two octal registers.

 

The only solution I have found that works (tried using SRAM OE) is to register the blanking signal along with the color data to a 74HC574 at the pixel clock speed.

This 1 pixel lag is ok, since the monitor could care less that the Front Porch shifted by 1 pixel.

It does however completely cure the most difficult problem in a design like this... fat or skinny first or last pixels.

Even the difference between OE propagation and the pixel clock is enough to make the first and last pixel stick out like a sore thumb.

Some monitors will even stretch the image to compensate, thinking that the video mode is non standard.

Seriously, if the first pixel is even 25% "fatter", you loose the 640x480 lock and get some banded 720 or other mode!

Even minute anomalies you cannot see with your own eyes are bothersome to newer LCD monitors.

The good ole days of "close enough" NTSC or CRT VGA timings are long gone now.

But this forces order and discipline.... and we MUST have ORDER!

 

Notice the perfect single pixel white border in Post #10.

This is by far the greatest accomplishment in building this entire Video Generator!

Pixel number one at (0,0) is probably the most troublesome, even on an FPGA design.

It's easy to spew out messy, glitchy, non standard video with missing or fat pixels!

 

I will discuss my solution in great detail when I do this writeup, but the 74HC574 register is by far the most foolproof option.

 

Brad

 

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Tue. Jun 7, 2016 - 12:51 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I couldn't see how you could do it without a register - the ram output is async and would glitch. Video circuits were my first lesson in pipelining - the address was always ahead of the pixels.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

Kartman wrote:
I couldn't see how you could do it without a register - the ram output is async and would glitch. Video circuits were my first lesson in pipelining - the address was always ahead of the pixels.

 

I think were are discussing two different concepts. I am talking about syncing the blanking signal with the 8 bit data output from SRAM.

You can actually feed the 8 bit SRAM output directly to a DAC, but then there is no way to sync the blanking and pixel data.

 

In Vulcan-74, I feed the SRAM output to 8 AND gates (74HC08) so each bit is anded with the active low blanking signal.

The resulting 8 bit ANDed signal is then fed to a final 74HC574 in order to remove any propagation differences between the 2 AND ICs.

This system ensures that the blanking starts and stops on exactly the next pixel clock so no pixels are fat or skinny (first or last).

 

It sound a bit "Rube Goldberg", but teven a 2ns difference between pixel data and the blanking can ruin your image with banding.

I will not tolerate banding in my video... it is simply not acceptable.

 

Funny that I can make a perfect 800x600 VGA generator in 15 minutes using any CPLD or FPGA. Doing it in logic is where the fun is at!

 

This has worked perfectly, and can tolerate a pixel clock up to 40MHz for 10ns SRAM.

 

Brad

 

 

I Like to Build Stuff : http://www.AtomicZombie.com

Last Edited: Tue. Jun 7, 2016 - 02:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I was thinking of gating the video with the blanking after the register but I can see the reasons for doing it before. I spent most of my teenage years wiring together ttl building cpus, video displays, computers, floppy drive controllers etc. Later on it became more microprocessor based stuff, so ttl use became less and less. My first fpga project I used schematic capture and built the logic out of ttl blocks. I learnt very quickly that registers were a scarce resource, so it took a couple more design spins to do things the 'fpga' way. All my video experience was before the advent of VGA, so 640x200 was the go and anything more meant real expensive Barco monitors.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the old days the CPU got the RAM 1/2 of the time and the video the other half, and that way the RAM got refreshed automatic.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Not on a trs80 or zx80!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

zx80 did not have a DRAM, so nobody cared, and it was the z80 that made the picture! (it's reading external nop's to make the video).

 

I don't know about trs80 I guess that it can live with the 7 bit refresh counter.

 

But if the video and CPU use same RAM there must be something to "emulate" dual-port port RAM (either the CPU wait ZX81 slow, CPU blank video , the PET way, dual speed RAM like C64, ST520  ), or real dual-port RAM but I don't think any from that time had it.   

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

zx80 did not have a DRAM, so nobody cared, and it was the z80 that made the picture!

and of course if it was doing something else it didn't make the picture ;o)  

 

David 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

SRAM sharing is fun. On a recent FPGA project, I did a sneaky trick to allow GPU and VideoGen to share the SRAM as efficiently as possible...

 

Instead of trying to buffer reads or writes on every second cycle, I setup an internal Block Ram large enough to hold one single line of video (800 pixels in this case). During the HBlank period, I quickly captured 800 bytes from the shared memory and stored it into the Block Ram. After that, the GPU has full access for quite a long time (75% or more of the entire line). Once the active video line started, the pixels were then sent to the DAC at the required 40MHz timing. Since I ran the FPGA at 100MHz, this worked out very well. Compared to dual cycle sharing, this method offered much more free time to the GPU.

 

In the Vulcan-74 project, I actually have to share the SRAM with 10 devices now!... VGA, CPU, and 8 sound channels. This is going to be challenging, especially doing it all in 100% 7400 logic.

 

Brad

I Like to Build Stuff : http://www.AtomicZombie.com

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the old days the CPU got the RAM 1/2 of the time and the video the other half, and that way the RAM got refreshed automatic. 

Not on a trs80 or zx80!

I'm not familiar with the any of the TRS-80 Model 'X' architectures, but the TRS-80 Color Computer did exactly that.  The MC6883 synchronous address multiplexer (SAM) handled all of the timing, including DRAM refresh and interleaved video/cpu DRAM access.

 

An overview of the design is here:

http://sparksandflames.com/files/Color%20Computer%20Technical%20Reference%20Manual%20(Tandy).pdf

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]