Simpler than Ben Eater's SAP-1?

Sdílet
Vložit
  • čas přidán 29. 08. 2022
  • Turing SAP1. An alternate take on the design of this very simple machine.
    I answer the deeper philosophical question of why this is even a computer.
    Don't forget to watch all three videos in the series (about 90mins watch time)
    Part 1 is on the Rulebook (AKA finite state machine)
    Part 2 is on the Notepad (memory system with some theory thrown in)
    Part 3 is on programming the Rulebook.
    There is a very special surprise at the end of Part 3.
    The schematic is available at
    github.com/Turing6502/TuringSAP1
    Turing SAP1 Schematic.pdf
    Emulator and EPROM generator (Visual Studio 22 - which is free)
    TSAP1.zip
    A more detailed analysis is available on this playlist
    • Turing 6502

Komentáře • 81

  • @michaelheuss6502
    @michaelheuss6502 Před rokem +25

    I think it depends on your definition of "simple". Fewer parts and a streamlined design? Yup. Easier for me to wrap my poor brain around? Most certainly not. :) But the explanations are excellent. Thank you!

    • @DrMattRegan
      @DrMattRegan  Před rokem +8

      Thanks, yes, that's why it's posed as a question rather than a statement. You might want to look at the Pure Turing czcams.com/play/PLjQDRjQfW-87Jbng4CllA9G12HLar0iF8.html or Turing6502 czcams.com/play/PLjQDRjQfW-84j-jLvrbEeDvGl0QrhX9p7.html playlists to get a better idea about how it works.
      Takes a bit of commitment, but once the penny drops, it's much more straight forward than it appears.

    • @e8root
      @e8root Před rokem +1

      Exactly my impression. Less parts doesn't mean design is any easier to understand and/or use. For circuits which do very specific things this might be good approach than throwing more chips and microcontrollers at the problem.

  • @edgeeffect
    @edgeeffect Před rokem +2

    Lots of people are building on Ben Eater's machine but, of what I've seen, this one is adding a lot more LEARNING... which is the whole point of building an SAP in the first place. NICE!

  • @xotmatrix
    @xotmatrix Před rokem +5

    Those commonly available header strips will quickly ruin a solderless breadboard but with a little searching you can find similar headers with slimmer pins that fit into solderless breadboards beautifully. I'm looking forward to the rest of this series.

    • @zbradbell
      @zbradbell Před rokem

      yep - round machined headers, easy to find

    • @DrMattRegan
      @DrMattRegan  Před rokem

      I suspect they will probably destroy the boards, but i think one off use is OK.
      Once i've built a board i usually don't disassemble them. I'm sure i'll come up with a new idea for
      a video the moment i pull it apart.

    • @zbradbell
      @zbradbell Před rokem

      @@DrMattRegan yeah, especially if it’s a better quality board (not steel contacts)

    • @DrMattRegan
      @DrMattRegan  Před rokem +2

      The other thing was switching from 74HC374 -> 74HC574 which have all the inputs on one side and outputs on the other.

  • @byronwatkins2565
    @byronwatkins2565 Před rokem +6

    This is very clever! But, it serves a different purpose than Ben Eater's series. Ben shows how each component of a computer can be made from simple binary logic and then shows how each subsystem plays its unique role in the overall computer architecture.

    • @DrMattRegan
      @DrMattRegan  Před rokem +3

      Thanks. I didn't want to just go over the same ground Ben already covered. Next video will be up soon, i'd be interested to see what you think.

  • @ARBB1
    @ARBB1 Před rokem

    What a great idea. It's great as a teaching tool too.
    Thanks for the video.

  • @dutchsailor6620
    @dutchsailor6620 Před rokem

    Instead of messing around with breadboards and unreliable connections, I build the SBC in Proteus. Works flawless in the simulator in real time.

    • @DrMattRegan
      @DrMattRegan  Před rokem

      Yes, each to their own. I like seeing hardware coming to life myself.

  • @lindoran
    @lindoran Před rokem +1

    Thanks this made FSM's actually digestible for my brain space. Very informative!

  • @dt1165
    @dt1165 Před rokem +1

    Excellent!

  • @e8root
    @e8root Před rokem +1

    This reminds me of old style mechanical devices with motors and various levers. Number of parts was very important and engineers used all tricks to simplify design some times making it quite hard to understand internal logic.

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      If you've got some time up your sleeve (several hours), i'd recommend watching this playlist czcams.com/play/PLjQDRjQfW-84j-jLvrbEeDvGl0QrhX9p7.html
      It goes over the theory in more detail.

  • @TradieTrev
    @TradieTrev Před rokem

    Mad dog! Love your work mate; Really love your explanation!

    • @DrMattRegan
      @DrMattRegan  Před rokem

      Thanks, glad you’re getting some value from it.

  • @MichaelSamerski
    @MichaelSamerski Před rokem

    Brilliant video thank you

    • @DrMattRegan
      @DrMattRegan  Před rokem

      Enjoy! You might like the Turing6502 series too.

  • @d.jensen5153
    @d.jensen5153 Před rokem

    Your VGA by ROM design crossed my radar screen for the first time yesterday. (Video generation has long been near and dear to my heart.) The very next day The Algorithm brings me SAP-1. Nothing to do now but subscribe!
    I have some GALs and a PAL programmer from back-in-the-day. Was going to make a SAP-type machine out of 16V8s, an SRAM, and an EPROM. The latest idea was to use the GALs in a bit-slice fashion, sort of à la PDP-8.

    • @DrMattRegan
      @DrMattRegan  Před rokem

      Welcome. If you are serious about building a machine, you might want to look at the SAP-6502 playlist. It's the same architecture as the SAP-1 but it's been bulked up to run 6502 machine code. The microcode is available through github and i'm concurrently doing a series explaining how the microcode works.

    • @d.jensen5153
      @d.jensen5153 Před rokem

      @@DrMattRegan I think your approach to SAP-6502 is absolutely brilliant! The way you leverage giant inexpensive EPROMs, and the way you use C to create their contents, was amazing! As far as throughput goes, do you think your SAP-6502 capable of 1 MIP? Or if not, would it at least be capable of the throughput of an NMOS 6502 clocked at 1 MHz?

    • @DrMattRegan
      @DrMattRegan  Před rokem

      I’ve had the Turing6502 running at 3.579MHz which is about 50% faster than the native 6502. You might want to check out that playlist as well.

    • @d.jensen5153
      @d.jensen5153 Před rokem

      @@DrMattRegan Perfect! Many thanks!

  • @derekchristenson5711
    @derekchristenson5711 Před 9 měsíci

    Very interesting! Also, it may be unnecessary, but I found the repeated "Knightrider" theme amusing every time. ;-)

    • @DrMattRegan
      @DrMattRegan  Před 9 měsíci +1

      Cool. The second video in this series (Memory) is one of my favorite videos. Let me know what you think.

  • @thek3743
    @thek3743 Před rokem +1

    Very different, and very interesting

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      Thank you! Cheers! Two more parts to the series.

  •  Před rokem

    I made the same PCB jumpers for exactly the same reason hehehe
    As always, I love your videos and the work behind it.

  • @MichaelKamprath
    @MichaelKamprath Před rokem +2

    Ha! I didn't think I was "taking it to the extreme", I was just trying to do more complicated math 🙂
    I am curious how you will do the math with no ALU. I think I see it with the EPROM, but I will await your next video to learn.

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      Hi Michael. Great to hear from you, i've been watching you develop PUTEY-1 from the start, it's getting pretty close to the 8-bit CPUs of the era. Hope you don't mind me mentioning it !
      Yep, it's all done with the EPROM, next video should be out soon, (i'm sure you know that editing is the longest part of the process).

    • @MichaelKamprath
      @MichaelKamprath Před rokem +1

      @@DrMattRegan Oh, I didn't mind, I was just surprised to here my PUTEY-1 referenced. I'll look forward to your next video.

    • @DrMattRegan
      @DrMattRegan  Před rokem

      @@MichaelKamprath new video is up. Let me know what you think when you get a chance to see it.

  • @adamrak7560
    @adamrak7560 Před rokem

    You can absolutely program FPGAs by programming the CLBs manually, without any abstractions.
    You can tell what bits you want inside the CLB and where the CLB should be, and how it connects to other CLBs.
    The compiler only does the routing in this case, which you can inspect if you really need to (I had to).
    You may even control the routing too, basically sidestepping the compiler, but that can be difficult depending on which type of FPGA you want to program.

    • @DrMattRegan
      @DrMattRegan  Před rokem

      At a guess, what percentage of people who use FPGAs use their own routing? I suspect you may be the exception to the rule, but that doesn't necessarily disprove the rule.
      I would say the vast majority use an HDL, so there is a layer of abstraction except for the super user.
      Some people like to re-write the microcode in their x86 machines, they are skipping the abstraction also.

  • @colonelbarker
    @colonelbarker Před rokem

    This is a really interesting video, I'm really keen to see where it goes. Have you pushed it to see how fast it will run? Slu4 got his breadboard CPU to push quite a few mhz recently!

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      I was amazed he could get 8 MHz on a breadboard. I struggle above 1 MHz on breadboard. Even If they run, they are unreliable. The PCB version of Turing6502 runs at 3.58 MHz. I have some 50 ns EPROMs/SRAM, I might crank this board to see how it goes. Below 250k is usually for fine. Some of the PureTuring examples had to run for days error free to get enough data to see Pac-Man move.

    • @colonelbarker
      @colonelbarker Před rokem

      @@DrMattRegan it's an amazing series of projects you have done. I really enjoy your explanations of why you have made the choices you have and how they are implemented.
      If I had to offer minor negative feedback it would be the nightrider gag got a little old for me. But I'm also too young to have seen the series!

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      @@colonelbarker all feedback is good 👍. It’s funny I was talking to someone else about it tonight and they said keep knight ridder thing to a single video.

    • @colonelbarker
      @colonelbarker Před rokem

      @@DrMattRegan that might be the way. It's great method for testing that the state machine is working.
      I'd love a video explaining the difference in the two state machine models you mentioned. It sounds like an interesting topic!

    • @DrMattRegan
      @DrMattRegan  Před rokem

      Good idea

  • @YateyTileEditor
    @YateyTileEditor Před rokem +1

    Which 74HC574 have you found that has a reset? I would have loved that but I had to settle for '273 instead

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      Yes, you need weak pulldown resistors on the outputs and reset is actually the output enable signal. I'm a recent convert to the 574 but it makes the jumper boards much easier

  • @AJB2K3
    @AJB2K3 Před rokem

    Cool idea with the BUS pcbs

    • @DrMattRegan
      @DrMattRegan  Před rokem

      Thanks, it really made the build much easier

  • @mheermance
    @mheermance Před rokem

    My guess for the seven bit board is that it's for output and ASCII is a seven bit code. But for testing you wanted to make sure all eight were working. As an aside it's good that the data bus pins in those chips are contiguous and in the same order. I have worked with a few chips where they're not and you wonder why the IC design engineers thought it was a good idea.

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      Good guess! But it was a much more practical reason. I do want to run 8-bits of the w-bus up to the top of the board.
      The maximum distance between the busses on that side of the 27C322 was 4 pins. So to keep everything aligned at the top of the board, the busses can only be 4 pins apart. The SRAM on the lower left uses the bottom 4 pins for data and ground, so the w-bus needs to abut the SRAM chip, but when I tried the 8-pin board I couldn’t squeeze it in.
      Martin, you’ve watched most (if not all) of my videos, I’m trying to approach the same material from different angles, what do you think?

    • @mheermance
      @mheermance Před rokem

      @@DrMattRegan I like how you are showing how this simple machine can emulate other more complex machines. The part count was especially instructive. It does it by moving the complexity into the rulebook which is essentially software. It's sort of the logical conclusion to RISC and shows how all computers have the same capabilities. Although those big EPROMs themselves have a lot of complexity stashed away inside them!

    • @DrMattRegan
      @DrMattRegan  Před rokem +2

      @@mheermance true, there is considerable engineering behind the memories. What I’m hoping to achieve is to basically show the nugget at the core. So when people see really complex architectures they don’t get intimidated and can break it into pieces. I worked in the Architecture group at Nvidia during the Tesla and Fermi period and it was the only way to understand the GPU.

  • @skilz8098
    @skilz8098 Před rokem

    What would be interesting would be to build a simulated NES on a breadboard... As for the cartridges or the games (roms)... that's were EEPROMS would come in. Just have an external board that you'd plug your EEPROM into and connect that to the systems input bus. Now as for the display, audio and the controllers that'd be a different story. However, I think that this would be a pretty cool project to complete.

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      I think the CPU side would be straightforward, its the PPU that would be the killer.

    • @skilz8098
      @skilz8098 Před rokem

      @@DrMattRegan Yeah, I had the same sentiments. The APU could be issues too. However, you could do 3 different bread board builds, one of the CPU, one for the PPU, and one for the APU and have them connected in the same manner as the original NES bus. Then the fourth module would be the I/O interface for the cartridges, controllers, and a/v outputs.
      It would be a fairly big build. It would also be an interesting build to see a working NES on a breadboard. However, the timings could be an issue due to the limitations of the bread boards and the sizes and lengths of the wires...

  • @paulstubbs7678
    @paulstubbs7678 Před rokem

    Interesting, although I'd like to see it transferred to a PCB, as tying up that many proto boards seems wrong.
    As for the EPROM state machine, I was thinking of a design using just an eprom, with the clock going into one of the address pins, so the EPROM has two almost the same banks that get alternated between by the clock.
    There is of course one big downside to this machine, all your code is hard coded into an EPROM, no keypad or serial port to allow code entry, so one is stuck forever erasing chips.

    • @DrMattRegan
      @DrMattRegan  Před rokem

      You might want to watch the last 5 mins of the third video!

  • @greenerell484
    @greenerell484 Před 8 měsíci

    using EEPROM truth tables still TTL ?

    • @DrMattRegan
      @DrMattRegan  Před 8 měsíci

      Well, Gigatron calls itself a TTL machine and it uses a big ROM. Can't think of too many "TTL CPUs" that don't use microcode in a ROM. TTL somewhat means not an FPGA or software core.

  • @The_Real_Grand_Nagus
    @The_Real_Grand_Nagus Před měsícem

    If they contain ducks, then are the really pidgeon holes?

    • @DrMattRegan
      @DrMattRegan  Před měsícem +1

      Well, yes. But what about metaphorical ducks in metaphorical pidgeon holes?

  • @TheOvvl
    @TheOvvl Před rokem

    Calculating Fibonacchi sequence?

    • @DrMattRegan
      @DrMattRegan  Před rokem

      Huh??

    • @TheOvvl
      @TheOvvl Před rokem

      @@DrMattRegan Interesting work! But wich numbers on display?

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      @@TheOvvl Fibonacci sequence which is the sum of the last two numbers displayed.

  • @honkhonk8009
    @honkhonk8009 Před 10 měsíci

    6:00
    Same here lol.
    I loved hacking Roblox. Id go on daycare simulator games and make my own script to spawn in a shit ton of terrorist NPC's and clown cars.
    There was this spaceship game where I would make whole armies of bots to just mine stuff for me and fight too lol.
    But then I really started to like coding and got invested into it.
    Now i bought some parts off Alibaba and im gonna try to make my own SAP-1 build lol.
    I might look into this cus it sounds cheaper

    • @DrMattRegan
      @DrMattRegan  Před 10 měsíci +1

      Good luck with the build. I'm working towards a kit soon.

    • @honkhonk8009
      @honkhonk8009 Před 10 měsíci

      @@DrMattRegan That sounds sick. Il definitely look into it.
      One cancerous thing abt breadboarding up a computer though is definitely keeping the wires neat.
      Im honestly tempted to just use a perfboard and wire up everything with jumpers, and hide the cable monstrosity lmfao.
      I wish it was possible to use a 3D printer as a plotter and pump out good quality PCB's

  • @DavidLatham-productiondave

    I'm confused. Why are there ducks in your pigeon holes?

  • @Dont_Gnaw_on_the_Kitty

    The real genius of Turing was that he could only use relays, selectors and punched tape ie single element's, in his design of a working computer. Hiding the complexity of state machines in your eproms may not be a good teaching aid.

    • @DrMattRegan
      @DrMattRegan  Před rokem +1

      I guess “real genius” is like “real beauty “ - in the eye of the beholder. I think the real genius of Turing is that his description is largely agnostic to technology. The terms relay, selector and punched tape do not appear in his 1936 paper - but each to their own. He does refer to a paper tape, but this is somewhat idealised in that it is infinitely long and can be erased and written over an infinite number of times.
      As for hiding details in an eprom, have a look at the Turing6502 playlist starting at video 6 - plenty of detail about every state in the state machine.

  • @pdr0663
    @pdr0663 Před rokem

    A couple of small beefs... "Automata" is the plural of "Automaton". Your project contain one "Finite State Automaton". Please leave out audio like the samples you use for the tick and cross. They are very jarring. Loved the substance of your video, thanks.

    • @DrMattRegan
      @DrMattRegan  Před rokem

      Yes you are correct. I think i'll stick to finite state machine (can't afford an editor). Thanks for the feedback. Have you looked at the Turing6502 series?

    • @pdr0663
      @pdr0663 Před rokem

      @@DrMattRegan yes I have, wonderful series, thanks. I try to follow it all in real time but I go crosseyed before the end. Need to play and stop to absorb fully. I have "The Art of Digital Design" by Winkel and Prosser. I'd like to design my own PDP-8, but extend it from 12-bits to 16-bits for fun. They have the synthesis of a PDP-8 as an example in the text. They make use of multiplexers to create the finite state machine, but I like your approach of EEPROM + '374. It'll be a retirement project for me.

    • @DrMattRegan
      @DrMattRegan  Před rokem

      The EPROM + 374 makes a great state machine. Normally, each video should be about 1hr, but I compress it for youtube. Don't be afraid to watch them multiple times and ask questions.