Author Topic: Turing 6502 - Simple TTL build of a 6502 microprocessor  (Read 2694 times)

0 Members and 1 Guest are viewing this topic.

Offline matthewreganTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Turing 6502 - Simple TTL build of a 6502 microprocessor
« on: September 21, 2021, 10:39:50 am »
Hello, I'm Matt Regan.



I'm publishing a set of videos on how to build a 6502 CPU.
I'm using a Turing Machine and emulating the 6502, so the design is very simple.

I was hoping to get some feedback, thoughts and opinions.

Currently working on Part 3.

Regards
Matt.
« Last Edit: September 21, 2021, 10:41:27 am by matthewregan »
 
The following users thanked this post: benst, xrunner, Alex Eisenhut, mikerj, syau, dl6lr

Offline benst

  • Regular Contributor
  • *
  • Posts: 87
  • Country: nl
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #1 on: September 21, 2021, 03:54:44 pm »
Nice, subscribed!

Ben
I hack for work and pleasure.
 

Offline AccountRemovedPerUsersRequest

  • Regular Contributor
  • *
  • !
  • Posts: 117
  • Country: ee
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #2 on: September 21, 2021, 06:32:08 pm »
Welcome to the club!
This is mine.
 

Offline matthewreganTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #3 on: September 22, 2021, 12:53:19 am »
Very good.  Out of interest how fast does it run?
Mine seems OK at 100KHz but at ~1M it is very sensitive to capacitor placement and I start to get some errors.
Could probably improve my power distribution.
 

Offline AccountRemovedPerUsersRequest

  • Regular Contributor
  • *
  • !
  • Posts: 117
  • Country: ee
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #4 on: September 22, 2021, 04:53:58 am »
I did not test the max frequency at the time I had the breadboard version running. The max stable frequency for PCB version (attached) is 2.7MHz.

A
 
The following users thanked this post: mikerj

Offline matthewreganTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #5 on: September 23, 2021, 12:26:35 am »
Very good, I got similar numbers on the PCB version


(the important section is 45 seconds into this video)


It's clocked at 3.5 Mhz, but I lose some performance sending pixels back over the USB.
I don't have any fixed hardware for the ALU, PC, IR, Acc, SR etc, so it takes about ~2.5 clocks (average) per 6502 clock.
So this Pacman demo is very close to the equivalent of real-time on an Apple 2.
« Last Edit: September 23, 2021, 03:14:05 am by matthewregan »
 

Offline matthewreganTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #6 on: September 25, 2021, 07:09:01 am »
Part 3 is complete and freshly uploaded.
This video explains in detail why I designed the memory system the way I did.

https://youtu.be/sb2DaRAZ17s

 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3035
  • Country: us
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #7 on: October 12, 2021, 06:07:12 pm »
Very interesting approach to building a TTL CPU.

So if I understand everything correctly, with your final PCB version the Turing machine is running at around 3.5 MHz and at that speed it is able to simulate a 6502 running at 1 MHz?

I'm curious how the timings of the individual instructions compare -- have you done any analysis or measurements?
 

Offline JuanGg

  • Regular Contributor
  • *
  • Posts: 193
  • Country: es
    • My personal blog
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #8 on: October 12, 2021, 07:41:46 pm »
Interesting indeed. I'll be sure to check out your videos.

Here is my overly complicated and convoluded (but functional) implementation of a 6502 CPU. The inverse wire-wrapping is certainly a nice technique.
It just brute-forces the control unit with several EEPROMs. Not the most elegant thing for sure.

    Juan

https://juangg-projects.blogspot.com/2020/07/6502-compatible-ttl-computer.html


Offline matthewreganTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #9 on: October 19, 2021, 01:22:01 pm »
Yep, it actually takes about 2.5 clocks per 6502 clock.
This is based on the emulator for 20 million instructions.
AppleWin took 57 million clocks and the Turing 6502 took 140 million clocks.

The remaining slowdown is due to the clock stopping for Arduino access.

In the Pure Turing playlist I'll go through the architectural changes that get us closer to the 6502 architecture.


 

Offline matthewreganTopic starter

  • Newbie
  • Posts: 6
  • Country: au
Re: Turing 6502 - Simple TTL build of a 6502 microprocessor
« Reply #10 on: October 19, 2021, 01:27:08 pm »
Hi Juan,

Actually, I've watched your youtube video many times, I think I was one of the first to like it.

Props to anyone who can get a TTL 6502 to work.  I personally didn't want to design another custom CPU that only does a Fibonacci. 
The 6502 is a tough bird.

I took a bit of a different approach, I wanted to bridge the gap between a Turing Machine and Von Neumann architecture.

I'm curious to see what you think of this approach.

Regards,
Matt.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf