6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 9:31 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: TTL build is alive!!!
PostPosted: Sat Nov 20, 2021 4:36 pm 
Offline

Joined: Sat Apr 17, 2021 1:10 pm
Posts: 15
Sorry, but had to share. This has been a side project of mine for most of covid, working evenings and odd weekends. If you recall, Ben Eater built a 6502 computer and made it say “Hello, world!”. Once I had mine version working, I thought it would be cool to build my own 6502 and replace the 65C02.

Today’s the day it came alive and said hello!

Image
Image

Hopefully the images will show up. The CPU itself is fully wired on the breadboard, and my next step is to convert it to a pcb. The wires you see bottom right are to connect the 65c22 from Ben’s build to the Led display, as well as to the nano on the board that’s acting as both the debugger, memory, and microcode eproms. This allowed me to load test programs during development and program the microcode. Now that the microcode is complete I’ll program 3 16-bit roms to provide the 48 lines

So happy it works!!!


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 20, 2021 5:12 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1488
Location: Scotland
Noggin wrote:
Sorry, but had to share. This has been a side project of mine for most of covid, working evenings and odd weekends. If you recall, Ben Eater built a 6502 computer and made it say “Hello, world!”. Once I had mine version working, I thought it would be cool to build my own 6502 and replace the 65C02.

Today’s the day it came alive and said hello!

Image
Image

Hopefully the images will show up. The CPU itself is fully wired on the breadboard, and my next step is to convert it to a pcb. The wires you see bottom right are to connect the 65c22 from Ben’s build to the Led display, as well as to the nano on the board that’s acting as both the debugger, memory, and microcode eproms. This allowed me to load test programs during development and program the microcode. Now that the microcode is complete I’ll program 3 16-bit roms to provide the 48 lines

So happy it works!!!


the images didn't come through for me -I think that's due to the way your image host (imagebb) does things - it probably doesn't like them being embedded that way.

I've uploaded them here for you though:

Attachment:
File comment: TTL 6502
ttl1.jpg
ttl1.jpg [ 4.15 MiB | Viewed 5016 times ]

Attachment:
File comment: TTL 6502 - Wider Image
ttl2.jpg
ttl2.jpg [ 2.57 MiB | Viewed 5016 times ]


Looks good!

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 20, 2021 5:16 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
Very breadboard! Much wires! Well done!


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 20, 2021 8:51 pm 
Offline

Joined: Sat Apr 17, 2021 1:10 pm
Posts: 15
Thank you, Gordon. :)


Top
 Profile  
Reply with quote  
PostPosted: Sat Nov 20, 2021 9:58 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Noggin wrote:
So happy it works!!!
Congratulations on your success, Noggin! An exciting moment, I'm sure!

Are you planning to run Klaus's test suite? It has a long history of revealing unsuspected bugs. I think it can be found somewhere near here: ttps://github.com/Klaus2m5/6502_65C02_f ... /bin_files

-- Jeff

_________________
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 Nov 21, 2021 12:46 am 
Offline

Joined: Sat Apr 17, 2021 1:10 pm
Posts: 15
Oh, yes. That's a great idea! I have one more test to write for interrupts and RTI, so once that's done i'll give Klaus's test suite a run. Should be fun :shock:


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 21, 2021 3:53 pm 
Offline
User avatar

Joined: Sun Dec 27, 2020 11:12 pm
Posts: 94
Location: France
Very impressive work Noggin! It must take a great deal of perseverance to get to this point. Have you hit any manor roadblocks along the way or did everything work nicely together?

_________________
Jonathan Foucher

Take a look at the Planck 6502 computer.


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 24, 2021 6:40 am 
Offline

Joined: Sat Apr 17, 2021 1:10 pm
Posts: 15
Definitely lots of hurdles along the way. Most of the hardware was built without much understanding of the timing or nuances of the design (especially where they weren’t covered in Donald’s block diagram). So as I programmed the control lines for each opcode I had to make quite a number of ‘hacks’. These usually meant pulling control lines half way across the board to reach a free logic gate in order to hard wire a conditional fix, such as the final one which was to skip the program counter increment whenever an interrupt fired.

Next, I plan to make a pcb from the design. This will likely take longer than the building itself as I have to reverse engineer the whole circuit and all of the hacks.

I tried to run the Klaus test but not sure I built it correctly. Having first installed a windows VM so I could compile the test, I loaded it into my debugger and each starting vector (nmi, reset, irq) just jumped to a loop? Am I supposed to change this to $1000?

Edit: Actually, the next step is to remove the circuitry on the bottom right two breadboards and replace this with the 3 programmed proms that will hold the microcode. If I also add some dedicated memory then it'll be completely standalone and I see how fast (or not) it'll run


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 25, 2021 3:30 pm 
Offline
User avatar

Joined: Sun Dec 27, 2020 11:12 pm
Posts: 94
Location: France
Noggin wrote:

I tried to run the Klaus test but not sure I built it correctly. Having first installed a windows VM so I could compile the test, I loaded it into my debugger and each starting vector (nmi, reset, irq) just jumped to a loop? Am I supposed to change this to $1000?


You have to load $400 in the PC and then set it loose : https://github.com/Klaus2m5/6502_65C02_ ... st.a65#L37

I wonder if / how you can achieve that on your build though...

_________________
Jonathan Foucher

Take a look at the Planck 6502 computer.


Top
 Profile  
Reply with quote  
PostPosted: Thu Nov 25, 2021 4:54 pm 
Offline

Joined: Sat Apr 17, 2021 1:10 pm
Posts: 15
Thanks for that... I guess that's what I get for not paying attention to the read me :). I'll see if I can run the test over the weekend


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 26, 2021 12:13 am 
Offline

Joined: Sat Apr 17, 2021 1:10 pm
Posts: 15
I had some time today to run klaus’ test and I’m beginning to think it’s failing. Due to the debugger it only runs at around 4 cycles per second and has been looping over and over around what appears to be the same set of 256 dex instructions - give or take a few branch / jump instructions. So far it’s completed 14500 cycles and I’m not sure if this is expected or if it’s stuck in a loop? It’s definitely not a tight loop so I’ve left it running


Top
 Profile  
Reply with quote  
PostPosted: Fri Nov 26, 2021 9:41 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
The full test takes a little under 100 million cycles - it's best to run it as fast as you can, with the only overhead being to detect the failure case. By default, I think, it fails into a tight loop, which can be detected in various ways.
See this thread
viewtopic.php?f=8&t=6202


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

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