6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 22, 2024 5:36 pm

All times are UTC




Post new topic Reply to topic  [ 842 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 57  Next
Author Message
PostPosted: Wed Jun 17, 2015 12:23 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Thanks for the info, Garth. I certainly agree that I will have more than a few ghosts in my new machine!

On this one, my max speed is 20MHz through the VGA system and GPU. How I made this work in my current (smaller) breadboard setup is to add clock synced 74HC574 registers after any pathway exceeding 30ns. Much like doing it in HDL, this has worked remarkable well on my breadboard designs.

Just from the output of the video buffer SRAM to the R2R DAC for instance, I have 3 registers in the pathway!
This way, I have accounted for not only all of the issues with breading, but also the worst case propagation of all of my components and then some.
It takes only a small level of support logic to deal with delayed clock arrivals.

Hell, my original circuit even used 15ns SRAMS and a 138 decoder, and it was pulling 640x480 at 25.175MHz.
I only lowered the clock to satisfy the 800x600 (divided in half) VGA standard.

So I absolutely and completely agree with everything you said, and have found a way around these issues thanks to many, many late nights of trial, error, smoke, and mirrors.

I also lay out my boards in such a segregated way so that no high speed path exceeds 8 inches. Video, GPU, Sound, and Control systems are all self contained, having their own bus systems.

In this system, the 6502 does not have any access to any other bus besides it's own 64K 10ns SRAM, which is preloaded via support logic on power up. Because of the blazing fast design of my GPU, the 6502 need only issue a few bytes in order to toss a dozen or more multi-sized 256 color sprites around the screen at 60 frames per second, complete with alpha (transparent) pixel control. This is why I am doing sneaky illegal op tricks to listen to the 6502.

I have no doubt that I will meet or exceed every single one of my design goals here, and look forward to detailing how I pulled it all off.
As you can probably guess, I love doing things the most difficult way possible, and have no fear of pushing to the absolute edge of limitations (and sanity).

In one FPGA project, I pushed a 10ns SRAM up to the "impossible" speed of 100MHz to get 1024x768 video by having what I call "2 in the barrel", which means that 2 clock pulses are still propagating through a bus before reaching an IO port. Imagine the coding and hardware required for that kind of high speed GPU! Oh the fun of it all.

I enjoyed the sticky thread on high speed design and think it should be required reading just to enter this forum!
The only thing I would add at the end would be...

... but there are ways around every single limitation you have just been taught!

Anyhow, thanks for your logical and sound speed limit advice, I will keep it in mind as I pass the next minivan in a no passing zone, doing 50 over the limit!

Hopefully this weekend will offer a rainy day so I can start putting some black magic into the immortal 6502!!

Cheers,
Radical Brad


GARTHWILSON wrote:
banedon wrote:
I was wondering how you managed to go for 10ns SRAMs as the best I could find is 15ns Cypress CY7C199CN in DIP. I like your solution, although it looks a bit fiddly/time consuming!

He has the Cypress CY7C1049D which I use in the hobbyist-friendly 4Mx8 10ns 5V SRAM modules I make and sell. I know I've seen 8ns and 6ns SRAMs in lower densities.

Quote:
but my downfall isn't my lack of understanding of ringing, ground bounce, propagation, cross-talk, and capacitance. My downfall has been overwhelming success!!

You forgot inductance which is a big killer. If your new project covers the whole set of breadboards pictured, your wires will be twice as long as the cookie-sheet set. Running something like SPI or even memory at 25 or 57 or 80MHz is not like trying to run a 6502 at those speeds. I want you to be successful, and I want to spare you the frustration I think you'll have with the current plan. I think you're much more likely to be successful if you use wire-wrap and get the whole thing in a more compact layout, and use perfboard with a ground plane and solder each ground pin directly to the plane around it and put a bypass capacitor from each Vcc pin to the ground plane around it. The bigger the layout, the more important this becomes. Regardless, the most important part to keep clean is the clock distribution system. We had another member a few years ago who ran into clock problems with his '816 computer built on a breadboard layout that was much smaller than yours. It will also help to keep the processor's own buses in close, and not run them all over the layout, if it's possible to interface the farther stuff through I/O instead.

The Cray-1 ran at 80MHz with long connections, but they were twisted pairs, with each signal wire being twisted with its own ground wire grounded at both ends, so each one was a legitimate transmission line.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 18, 2015 2:19 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Had an hour of free time last night, so I added all the connecting wires and decoupling caps to the breadboard and then layed down the video driver section.
It's cool that the entire video section only took up one column out of the 4 available on the massive board.

This small bit of circuity is a complete 400x300 VGA driver that includes a seamless double buffer, offering synced frame switching of fully bitmapped displays so that the CPU or GPU can have complete independent access to one video memory while the other is being hurled out to the monitor. Both SRAMs are 512K, but I am only using 120K of each. Addresses are mapped as 9X and 9Y so that dealing with the 9th bit is only a single compare / branch in code.

The VGA circuit is clocked at 20MHz by the can at the center, and drives the 800x600 VGA standard, following timing to the EXACT cycle. Video is divided in half both horizontally and vertically so that banding is kept to a minimum. As it stands, this video system could accept addressing from any microprocessor capable of handing 18 address lines and 8 data lines. Any 32 pin uC can plug right into this system.

I am not planning to let the 6502 talk directly to the video memory, because it wouldn't be able to do much. Trying to spew out bytes at 16-20MHz and draw something more complex than Space Invaders would make the 6502 cry, so the next column of the board will be a logic based ultra fast GPU system, capable of block transferring variable sized bitmaps from a dedicated 1024K memory to the back buffer via commands send by the 6502. The GPU will be capable of sending 20 million pixels per second back and forth, including a selected transparent "Alpha" color, that will allow overlapping sprites without having to resort to "standard" gaming tricks like xor copies to maintain the background, as these are horrifically slow.

I think the GPU may take more than one column on the board, so it will be getting tight to squeeze the 4 channel sound system in there!

Here is my video layout so far (based on the other breadboard mess that works perfectly)...

Image

If I get my shed built this weekend, or if I get rained out, I will stuff the board full of wires and then get the video system up and running. Video tests are done using an AVR with graphics libraries I did way back on my Lazarus-64 retro game system...

Image
http://lucidscience.com/pro-lazarus-64%20prototype-1.aspx

I can't wait to try some interesting ultra-speed IO decoding tricks on my 65C02!
The GPU has to get built before I start working on the 6502, though.

Cheers,
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 18, 2015 7:12 pm 
Offline
User avatar

Joined: Thu Jun 23, 2011 2:12 am
Posts: 229
Location: Rancho Cucamonga, California
This is a great project and I'll follow it closely!

But aren't you cheating just a little bit if you say you only want to use 1980s technology but you use 10ns RAM? I remember in the 1980s the fastest RAM you could get was probably 70ns DRAM, and that was when home computers were getting pretty popular.

By the way, Alliance sells a 512KB SRAM chip (AS6C4008) that works at 55ns and is available in a DIP. They have faster chips too but not only in SMD. Of course those didn't exist in the 1980s either but anyway, just thought you'd like to know, if you didn't already.

===Jac


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 18, 2015 7:29 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Thanks!

Well, in my rules, I did allow for current variants of classic technology. So HC replaces LS, VGA LCD replaces NTSC CRT, and SRAM can be as fast as I want.
I will avoid all moden parts such as CPLD, FPGA, and any other non 74 logic parts.
Keeping it all DIP as well, with the minor exception of the dead-bugged SOJ parts.

I want this thing to look cool when it is put into the glass front wood cabinet, complete with a 360 degree view of the board and back-lighting!

In this day and age of bloated drop-in code and 400MHz proto-boards that monkeys could program, I simply want to make a thing of beauty and decent function with my bare hands. Moving ahead by traveling in reverse!

I have a few of the 4008 DIPs in my collection, they worked well on a 256x240 VGA project.

Brad

jac_goudsmit wrote:
This is a great project and I'll follow it closely!

But aren't you cheating just a little bit if you say you only want to use 1980s technology but you use 10ns RAM? I remember in the 1980s the fastest RAM you could get was probably 70ns DRAM, and that was when home computers were getting pretty popular.

By the way, Alliance sells a 512KB SRAM chip (AS6C4008) that works at 55ns and is available in a DIP. They have faster chips too but not only in SMD. Of course those didn't exist in the 1980s either but anyway, just thought you'd like to know, if you didn't already.

===Jac


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 20, 2015 12:46 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Had an hour to spare tonight, so I threw on some era-appropriate music (Judas Priest), and added a few things to the Vulcan board.

Image
After cutting a few holes with a boring mill, I added ports for VGA, Audio, Power, and a Switch.

Image
Wired up the R2R DAC and tossed in a 574 register so I could test the VGA port wiring.
Notice the color of the wires, which correspond to the color space of RRR-GGG-BB.

Image
This quick and ugly code hack tosses 50 sprites around the screen over the bitmap.
Sprites are 256 colors, have transparency, priority, and can be any size.
These sprites are 32x32. In reality, the aren't really "sprites", I just like the name!

To get VGA to the new board, I stuck 12 inch long wires from the other board out to the new 74HC574!
The 400x300 VGA image looked just as clean!
Isn't it amazing what you can get away with when you should know better but try anyway!!

Ok, that's all for now, going to hit the Tequila and relax!
If it rains tomorrow, I will try to get some time and defend the faith a little more.

Radical Brad


Last edited by Oneironaut on Sat Jun 20, 2015 3:08 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 20, 2015 1:51 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
I have one questions, as you say you only use devices available in the 1980's then shouldn't you also allow PALs and their derivates, at least GALs? PALs have been developped and produced by MMI since 1978.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 20, 2015 3:00 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Good point, but that might violate the rule... "parts must still be produced, easy to get, and available at Digikey".

Brad

cbscpe wrote:
I have one questions, as you say you only use devices available in the 1980's then shouldn't you also allow PALs and their derivates, at least GALs? PALs have been developped and produced by MMI since 1978.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 20, 2015 8:39 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
http://www.digikey.com/product-detail/en/ATF22V10C-15PU/ATF22V10C-15PU-ND/1008580


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 20, 2015 8:44 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Nice!
Didn't know you could get them in small footprint DIP.
Might be using these on a future project.

cbscpe wrote:


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 20, 2015 8:55 pm 
Offline
User avatar

Joined: Sun Oct 13, 2013 2:58 pm
Posts: 491
Location: Switzerland
Be aware that programmers that support the ATMEL SPLDs are very expensive though. Normally I get Lattice GALs from ebay, which can be programmed as well by cheap programmers


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 20, 2015 9:08 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Yeah, just read a thread on AVRFreaks echoing that same thing.
For this reason, I won't be using anything "specialized" in this project.

This is also why I can't see the reason to use EEPROM in a 65C02 project these days when for a few cents, you can pre-load a fast SRAM and do away with all the wonky propagation issues and slow clocks needed to support 150ns technology, not to mention having to dredge up an expensive programmer.

Brad

cbscpe wrote:
Be aware that programmers that support the ATMEL SPLDs are very expensive though. Normally I get Lattice GALs from ebay, which can be programmed as well by cheap programmers


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 20, 2015 11:06 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Finished the wiring for the output section of the double buffered video subsystem.

Image
Address and Data switching from both Video Memories.

The CPU or GPU has full access to one bank of video memory while the other is being driven to the monitor by the frame generator subsystem.

Address paths A and B are connected to a set of switched 74HC245s (not connected yet), allowing the CPU and GPU access to whichever SRAM is not being fed from path C by the frame generator logic. Path C is switched by the 74HC574's with their inputs connected together. The data paths are similar, and switching is accomplished by a single IO line that switches everything on the low edge of the vertical sync pulse.

Any path that exceeds 40 nanoseconds is buffered by a 74HC574 synced by the main 20MHz clock, so typically no path exceeds 2 ICs.
Red and blue are the 2 possible pathways through either SRAM, and yellow is the data path from whichever SRAM is "Live" to the DAC feeding the VGA monitor.

This system was originally tested with only 15ns SRAM, and with 25.195MHz clocking for 640x480 VGA.
Now running at 20MHz with 10ns SRAM, there is a much larger safety window.

Now I am stripping up another hundred or so wires to connect up all of the 74HC688's and the 74HC590 counters to create the frame and sync generator.
Should be seeing a screen full of 120,000 random pixels very soon!

After that, I get to finally try my strange 6502 decoding system, which will draw pixels to the screen.

Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 21, 2015 12:59 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Hooked up the address counters for cascaded operation and probed the board to test the clock signal.
There are 2 counters for each address - X and Y, which are 9 bits each.

Image
Main clock running at 20 MHz.

Image
Probing bit 0 of the X address counter.

Image
Each bit divides the clock by 2. Bit 0 results in 10MHz.

Image
Probing bit 7 of the X address counter.

Image
20 MHz divided by 256 equals 78.125 KHz

Image
Probing the 15th bit of the cascaded counter pair.

Image
20 Mhz divided by 65536 equals 305.176 Hz.

Seems the address counters are ready to go.
Next step will be to push the X and Y counters into the address switch and to the comparators.
Comparators will trigger 74HC74 SR flip-flops to control sync pulses and blanking intervals.

A few more hundred wires to go and then the video subsystem will be ready!

Cheers,
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 21, 2015 2:28 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Added the connecting wires to chain both rows of 74HC688 comparators together...

Image

There are 5 comparators for the horizontal sequence and 5 for the vertical sequence.
Comparators are wired for 9 bit operation by tricking the OE through an inverter.

The unwired chips to the right of each row are flip-flops, which will drive sync pulses and blanking periods.

That's all the time I have for this weekend. Should have random pixels by next week.

Later!

Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 21, 2015 6:01 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8505
Location: Midwestern USA
Oneironaut wrote:
This is also why I can't see the reason to use EEPROM in a 65C02 project these days when for a few cents, you can pre-load a fast SRAM and do away with all the wonky propagation issues and slow clocks needed to support 150ns technology, not to mention having to dredge up an expensive programmer.

I use a 55ns EPROM in POC, and the OTP version is available down to 45ns.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 842 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 57  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: