6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 8:18 am

All times are UTC




Post new topic Reply to topic  [ 842 posts ]  Go to page 1, 2, 3, 4, 5 ... 57  Next
Author Message
PostPosted: Sat Jun 13, 2015 7:37 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
*** UPDATE ***
This Project has been fully reloaded! See the final version come to life here...
https://www.atomiczombie.com/vulcan-74/


Greetings to all 8 bit hackers!
Just wanted to make a brief introduction and start a kind of blog on my new 6502 project.

Like many here, I was introduced to computers in the early 1980's, and have dabbled in electronics and programming at a Hacker's level ever since! Remembering the good ole days, sitting in front of that glowing green screen of my PET-4016 brings back images of a better time, a time when a pixel and a byte were worth something, and a time when you had to hit the bare metal, talking directly to the machine in order to make your programs work.

These days, you can purchase a $20 board level computer that runs Linux at 400Mhz, and drop premade code into the flash in order to do just about anything without really knowing anything but how to click a few buttons. Where is the fun in that?! A Raspberry-PI is certainly a powerful piece of hardware for the money, but in my opinion these things do not fit into the electronics hobby zone, nor do they teach much about hardware and bare metal programming. Just a computer without a box.

I will admit to going down this path myself, as my last project was a VGA video generator strapped to an AVR. Coding in Verilog for the very first time, I was able to make my project work in one afternoon! With a 1 million gate FPGA capable of running at 400MHz and a hardware synthesis tool that almost thinks for itself, I soon realized that this hobby was getting boring! What was going on under the hood?

So my goal is to devolve back to the 1980's and build a retro game system.

Now when I say "Retro", I don't mean some Arduino-thingy running Pacman, I mean a complete system built from the gate level using ONLY hardware that was available in 1984 during the time when the C-64 Animals sat in a room smelling of reefer, staring at hand written schematics made with mostly 7400 logic components. Yeah, these were the days where true Hackers needed more than a set of trendy dark framed glasses and a premade $15.00 embedded kit to call themselves Hackers!

Ok, so now that I have explained my reasoning (or lack thereof) for starting this project, let me explain what my goals and rules shall be.

The Rules...

- Only 7400 logic gates that were available in the 1980's may be used. Chips like 7404, 74688, etc.

- All chips must still be available at Digikey and easy to source. So only 74HC logic will be used. No 74LS or e-bay items like 74LS188 may be used.

- The only processor to be used will be the 65C02 from Western Design Center. This is because the chip is still available and because Bill rocks.

- Although I must only use 1980 era parts, I am allowed to used today's variants. So 74LS is replaced by 74HC (but not 74AC), and all SRAM can be 10ns speed.

- All parts must be DIP so they can be used on a breadboard initial prototype. I will bend the rule only in the case of the SRAM, and use SOJ parts, which are certainly hand solderable to a DIP socket.
Absolutely no modern parts such as AVRs, FPGAs, GALS, or custom ICs can be used. If the technology wasn't available to the Vic-20 crew, then I can't use it.

- The project must first prove itself on a breadboad. From there it will be hand wired onto perforated board. With an estimated chip count of 200, and a speed of 20MHz, I know this will be fun!

The Goals...

- Video must be perfectly stable VGA, putting out 256 colors at a resolution of 400x300 using an 8 bit color space divided into RRR-GGG-BB.

- Video must include full 256 color 400x300 bitmapped screens with a seamless double buffer for high speed animations and high detailed images.

- The GPU system will include a high speed (20MHz) blitter system capable of dealing with moving variable sized bitmaps from a dedicated 1MB memory bank to the back buffer independent of the 6502 CPU. The entire GPU must be made ONLY of 7400 logic parts.

- The sound system will be minimum 4 independent digital sound channels, and include its own 1MB independent sample SRAM. Much like the Amiga, the sound system is independent of the CPU, and again all made with 7400 logic parts.

- The completed system must be capable of impressive games (Amiga quality), not just some simple tile engine. All games will load only from an external EEPROM (cartridge) via onboard 7400 logic based loader. No external processing will be allowed.

- The CPU will be a 65C02 only. No 65C16, as this is too new for my system! The 6502 will run at 16MHz minimum, using whatever IO decoding tricks I see fit. Bus pirating illegal opcodes, etc. Prelimanry tests have shown stable operation at 20MHz using a ROMless system running from 10ns SRAM.

So that is my introduction to this great group!

I only hack at this stuff on odd weekends or rainy days, but I will post updates as Vulcan-74 takes life. No doubt these are lofty goals, but I know enough to put this together, but not so much as to listen to reason! Let the fun begin.

Here is the "Mother of all Breadboards", where my project will become self aware...

Image

Oh, and the reason for the name is because of the pure 74xx based hardware. Logical, Captain?

Cheers,
Radical Brad


Last edited by Oneironaut on Fri Mar 29, 2019 3:06 am, edited 4 times in total.

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

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
I like it!
Quote:
- The project must first prove itself on a breadboad. From there it will be hand wired onto perforated board. With an estimated chip count of 200, and a speed of 20MHz, I know this will be fun!

If using the large array of solderless breadboards shown, you will probably have to go considerably slower to get it to work. 5ns and faster rise and fall times are not simply DC being switched quickly. Make sure you see our sticky topic here, "Techniques for reliable high-speed digital circuits," and my page "Construction: Avoiding AC-Performance Problems" which is chapter 9 of the 6502 primer section of my website.

Quote:
- The CPU will be a 65C02 only. No 65C16, as this is too new for my system!

How far back in the 1980's do you want to go? The 65C816 (I'm assuming that's what you meant) came out in '83, soon after the 65c02. There were also simple programmable-logic devices available in the 80's.

On the non-forum section of this website, there are a lot of projects shown where people even made 6502 and other home-designed processors from TTL or even discrete transistors. Be sure to check them out. Dieter has an impressive 32-bit one.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


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

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Hey thanks, good to hear from you - I have consulted your information several times during my initial 6502 bootup testing. great stuff!

I will admit to being a cycle counting, propagation fanatic! I count every single cycle in all of my projects and work out propagation as if my life depended on it. In my initial testing, I strapped a 10ns SRAM to a 65C02, and then force fed the RAM with an AVR. My decoding path was only 12ns worst case, and I was actually running the 6502 at 25 MHz, clocked from a crude 640x480 VGA circuit I slapped down on breadboard...

Image
Running a 65C02 at 25.175Mhz with no issues!


Image
640x480 image drawn by the 6502 by hurling bytes from an SRAM!

That entire scrambled mess runs at 25.175MHz, with all propagation accounted for using 74HC574s to register bytes whenever a path exceeded 40ns.
This made for some interesting tracking of VGA timing to keep it perfect, but it worked great, keeping to the 640x480 standard exactly.

I was actually happy with 640x480, but to be honest it was just too much memory per frame. By stepping down the 800x600 standard to half, this became a more reasonable tradeoff for a game system.

In my new system, running at 20MHz, no path will be longer than 36ns according to my late night design / hacking.
The 65C02 dedicated 64K SRAM is 10ns, and has a worst case 12ns delay through the very simple RW/PH2 circuit.
Since I am force feeding that 64K on bootup, and then bus pirating illegal opcodes to give myself seamless bank swapping and GPU access, 20MHz is easily achievable.
I could pump it back up to 25MHz again, but that would mean some banding in the video due to out of phase clock domains in the main logic and video logic.

I guess I am kind of "cheating" already having made a 6502 talk to a 640x480 video mess of wires, but the new system will have LOADS of power thanks to the GPU system.

There will even be a subsystem I call "The Canvas", which is a 512x512 virtual bit-mapped screen that can be overlayed / scrolled onto the 400x300 back buffer seamlessly without CPU intervention.

Wish I had time today, but since the sun is shining, I am out doing yard work!
Perhaps tomorrow I will begin soldering the 8 SOJ 512K SRAMs down onto their sockets.
Did this a few times already on other projects, and it works great!

Image

Interesting point about the 816!
I may have to have a look at it again, I do have a drawer full of them actually.

I wonder which would be quicker, "bus pirating" illegal ops for 6 cycle IO (2 bytes out) on the 6502, or using the 816 and latch at 20 MHz to actually reach video memory directly?

Hmmmm, more to keep me up late tonight!

Thanks for the reply Garth!

Brad


Top
 Profile  
Reply with quote  
PostPosted: Sat Jun 13, 2015 10:14 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Part of what I mean is the longer wires of the bigger layout will have more ringing and more unwanted coupling between wires. They become like antennas, spring reverbs, and other things that could prevent operation. This is entirely separate from the matter of propagation delays.

For SOJs and SOICs, you can use the adapters made for the purpose, like this one whose image I grabbed from Jameco's site:
Image
They're a lot more expensive than the ICs that usually go on them, but it's worth it when you consider the amount of work they save you.

Quote:
I wonder which would be quicker, "bus pirating" illegal ops for 6 cycle IO (2 bytes out) on the 6502, or using the 816 and latch at 20 MHz to actually reach video memory directly?

If you haven't already, make sure you check out Jeff Laughton's single-cycle I/O on the 65c02 using unused op code, at http://wilsonminesco.com/6502primer/potpourri.html#Jeff on my site. I believe he has some slick 2-cycle stuff coming along the same lines for the '816.

I will be very pleased if you get this kind of thing going at 25MHz.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 14, 2015 8:15 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Very nice project - will watch this with interest!

(Everyone advises caution with breadboarding, but one way to see if that advice is well-founded is to press on and see what happens.)


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 14, 2015 3:28 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
BigEd wrote:
(Everyone advises caution with breadboarding, but one way to see if that advice is well-founded is to press on and see what happens.)


Thanks for all the comments and advice!

Having been into bread-boarding since the 80's, I should certainly know better!
but my downfall isn't my lack of understanding of ringing, ground bounce, propagation, cross-talk, and capacitance. My downfall has been overwhelming success!!

Here are just a few of my mid to large sized breadboard projects that certainly should NOT work due to all of the aforementioned issues.
For the record, I do not tolerate glitches or odd crashing, if a project does not work 100% as expected, it is scrapped.
VGA is particularly intolerant of timing issues. 1 missing cycle out of 420,000, and you get nothing on a modern LCD.

Image
25.175MHz - A 256x240 VGA game system using logic and an AVR.

This one from 2001, only ran at 25.175MHz, due to the use of slow 55ns SRAM I had laying around.
I initially did it on a breadboard, and then hand wired it on perf. board by soldering wires from point to point!
AVR is external to the system, acting as a cartridge. AVR overclocked to 25.175 MHz as well.

Image
25.175MHz - Generating glitch free animation at 60 FPS.

This project was a good learning experience into how critical every cycle is when doing VGA.
On an old CRT VGA monitor, you can get away with anything. Not on an LCD!

Image
57.262 MHz!! - Generating NTSC by controlling propagation delay.

Wanting to try something a level more difficult, I did a breadboard project that generated 320x200 NTSC. Everything except the AVR is 100% 74HC logic.
Color is generated by controlling the propagation delay through gates, from 2ns to 144ns. All of the logic ran at 57MHz, the threshold for most of the ICs used.
The AVR was clocked at 25MHz, and only had the job of hurling bytes to the video memory. This system had as much power as a NES game system.

Image
80MHZ - How about 800x600 VGA on this mess!!!???

This one should make a purest run and hide... 80MHz through a slapped together CPLD proto board. This thing generated perfect 800x600 VGA.
Notice the 512K 10ns SRAM dangling off long wires, free of any order or even decoupling capacitors! Yeah baby!
SRAM was accessed at 80MHz, making single cycle reads and writes non stop at 12.5ns.

Should any of these beasts work properly?? Probably not, but they do.
So like a veteran skydiver, I no longer fear the heights of high speed breadboard designs. Success has told me otherwise.

In my lab, a breadboard starts at 20MHz, and only starts to fly apart when you scrape the edge of minimum propagation delays of ICs being used.
So, when I say I will run a 65C02 at 16 or 20 MHz into a 3 foot squared breadboard populated with 300+ logic chips, I ain't kidding man!

For me, the enthusiasm begins when I hear... "that ain't gonna work, dude!".

I have a few hours today, so I am starting to mount the 512K SRAMS on the sockets and will strip a few hundred wires for the board.

Let the fun begin!

Cheers,
Brad


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 14, 2015 4:26 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
:shock: :!:

J. :)

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 14, 2015 4:48 pm 
Offline

Joined: Wed Jan 08, 2014 3:31 pm
Posts: 578
Wow! That tangle of wires and chips making video is a thing of beauty. I'd love to read the details of how it works.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 14, 2015 7:04 pm 
Offline

Joined: Mon Aug 05, 2013 10:43 pm
Posts: 258
Location: Southampton, UK
@Oneironaut

Very, very cool. I think solderless breadboard gets a "bad rap". I personally think there is little that can't be done with it, given good quality boards and leads.

Looking forward to how your project works out!

_________________
8 bit fun and games: https://www.aslak.net/


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 15, 2015 2:33 am 
Offline
User avatar

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

Had some time today, so I soldered the SRAMs to the sockets.
So far, I plan to use the 512K SRAMs as follows...

512K #1 = Front / Back Video buffer (120K used)
512K #2 = Front / Back Video buffer (120K used)
512K #3&4 = 1024K Graphics memory dedicated to GPU block copier
512K #5&6 = 1024K Sample memory dedicated to sound system
512K #7 = Multiplication and Division lookup tables for dedicated ALU

Not sure what to do with SRAM #8 yet, but no doubt it will find a home.

Hope everyone likes photos, I take a lot!

Image
SRAMs, sockets, and a bunch of wires.

Image
Bending the GND and VCC pins for direct connection.

Image
Ready for mounting to the sockets.

Image
Solder balls to accept the wires.

Image
SRAMs mounted to the sockets by 4 bent pins.

Image
Decoupling caps added for good measure.

Image
Adding wires to the pins and socket.

Image
Quality control using a magnifier.

Image
One SRAM done, only 7 more to go!

Image
4 Megs of 10ns SRAM ready for the breadboard!

Ok, that's it for now. I only do this on rainy days, so not sure when the next post is coming.
Will be adding ports to the monster breadboard next and then the layout of chips shall begin!

Besides the SRAM and 65C02, every other IC will only be 74HC logic.
Going to be fun to see how far this can go!

Cheers,
Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 15, 2015 4:49 am 
Offline
User avatar

Joined: Sun Jun 30, 2013 10:26 pm
Posts: 1949
Location: Sacramento, CA, USA
Quote:
For me, the enthusiasm begins when I hear... "that ain't gonna work, dude!".

Umm ... "that ain't gonna work, dude!". :wink:

Just thought I'd stir the pot, for good luck. Although it seems that you have made most of your own luck in the past, through careful analysis and preparation. I guess it's the equivalent to the old actor's saying "Break a leg!"

Mike B.


Top
 Profile  
Reply with quote  
PostPosted: Mon Jun 15, 2015 11:18 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Just need to tie all the VCC and GND connections on the breadboard strips together and then a duplicate video system will be layed out on the new board.
I will have to take my time and make an actual schematic in case anyone else out there is crazy enough to want to build such a thing.
For the most part, I just winged this all together based on ideas that caused many nights of insomnia.

Never though that my old "Cookie Sheet BreadBoard" would look small!...

Image

I still may run out of real estate after the GPU and sound system are also included. The smaller breadboard contains only the basic 400x300 VGA dual buffer system and an AVR/6502 image loader.
The GPU logic will probably have more chips, and I know the 4 channel digital sound system will have at least 70 chips.

Ironically, at 25 cents per logic chip, the cost won't be all that much more than large FPGA and support circuitry that would be needed to condense all of this.
Last time I made a crude Spartan-6 proto board, I was about fifty bucks into it, and that cost would fetch 150 logic gates!

Brad


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 16, 2015 10:55 am 
Offline

Joined: Fri Jan 17, 2014 6:39 pm
Posts: 47
Location: Poland
It is I, too praise.
This is an example of animation on the hardware c64 (1 MHz).
I added only 16 MB of RAM (Years 90 ') on the SIMM72 and control for systems 74HC .LS, HCT :)

https://www.youtube.com/watch?v=yxZ7Idi2Bi4&feature=youtu.be


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 16, 2015 7:58 pm 
Offline
User avatar

Joined: Sun Sep 08, 2013 10:24 am
Posts: 740
Location: A missile silo somewhere under southern England
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!


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 16, 2015 9:12 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
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.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 22 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: