How do CPUs read machine code? - 6502 part 2

Поділитися
Вставка
  • Опубліковано 21 лис 2024

КОМЕНТАРІ • 2,2 тис.

  • @c14n_
    @c14n_ 5 років тому +5085

    You should be incredibly proud of yourself for enabling so many people to understand computing at its core. I got a kit and am having an amazing time with it so far.

    • @berbudy
      @berbudy 5 років тому +35

      so true, Ben Eater is modern day Ra

    • @pahvalrehljkov
      @pahvalrehljkov 5 років тому +1

      what kit do you use?

    • @mistsu1171
      @mistsu1171 5 років тому +8

      ​@@c14n_ Oh, I think he/she meant that do you use this 6502 kit or the 8-bit computer kit or anything else

    • @ScottPlude
      @ScottPlude 5 років тому +10

      @@c14n_ I had no idea he sold kits. Thanks!

    • @pahvalrehljkov
      @pahvalrehljkov 5 років тому +2

      @@c14n_ thank you...

  • @willpreston6881
    @willpreston6881 5 років тому +2335

    Your breadboard wiring cleanliness is frustratingly good.

    • @drewbrown1534
      @drewbrown1534 5 років тому +81

      It's the hardest thing to get over while building this. My cable cutting skills are not this supreme.

    • @neilolif
      @neilolif 5 років тому +61

      You can't say he wasn't prepared for the demonstration.., And well scripted.

    • @tenstairs
      @tenstairs 5 років тому +66

      My favorite is that tiny little lead with

    • @reddunkey9267
      @reddunkey9267 4 роки тому +2

      What if we put this wired to transistor for each output and input to a motherboard of a computer

    • @4hdp3u64
      @4hdp3u64 4 роки тому +16

      Truly r/cableporn material

  • @REDPUMPERNICKEL
    @REDPUMPERNICKEL 3 роки тому +104

    This is a very pleasant stroll down memory lane.
    With serious intent I did in 1980 what you are now demonstrating.
    Even the breadboards look the same.
    Of course back then there were no Arduini and
    I used ultraviolet erasable EPROMS,
    (kept the lights - excellent for killing mold on my hovel's windowsills ).
    And used a programmer connected to my 8088 via Centronics cable.
    (Can't believe spell check didn't recognize Centronics, how the time flies).
    A student in the seventies, my university had but one computer, can you believe it!
    A statistics course forced me to use it, I punched IBM cards on a big steel desk and
    submitted a box full to the computer office where the pretty girl said
    'Come back in three days to pick up your output'.
    I was impressed by the asterisk graphs printed on wide fan fold paper
    and was utterly intrigued by how a mere machine could do it
    so much that I switched my major from psychology.
    That was the move that lead to my ruination.
    I had become so fascinated that I used the big old Underwood typewriter
    my dad had loaned me to write a 6502 assembler in 6502 assembly language
    so as to learn all about it.
    Can you imagine? My girlfriend couldn't. She left soon after.
    I threw the pot plants out and papered that spare room with 8x10 sheets of paper.
    Now 41 years have got behind me in what seems an instant.
    Cheers, eh.
    p.s. switched to 68HC11 soon as possible after discovering it had all those
    peripheral chips (glue, RAM, ROM, ACIA, 6821 & A/D converter) built right in to it.

    • @REDPUMPERNICKEL
      @REDPUMPERNICKEL 3 роки тому +6

      (Not to mention two accumulators and two 16bit index registers)!

    • @mrbrown6421
      @mrbrown6421 2 роки тому +4

      @@REDPUMPERNICKEL I see the problem. You tossed the pot plants.
      Yep, I remember handing a stack of punched cards to a pretty
      young girl at the computer room. She promptly dropped them,
      raked them up and handed them back with a wimpy 'sowwy'.
      Off I went to reorder my program, 1 card at a time.
      Of course we drew images on the sides of the cards to assist
      with these type of dim witted clumsy girls who should definitely
      toss the pot plants.

    • @REDPUMPERNICKEL
      @REDPUMPERNICKEL 2 роки тому +7

      @@mrbrown6421 Lol.
      Of course I didn't toss the pot.
      I was exercising literary licence.
      There seems to me to be
      a rogue neural process going on within that
      strives to make everything I write
      take on a poetic cadence.
      If you are familiar with Bicameral Theory
      you might recall the explanation for it.
      Happy Canada Day.
      Cheers eh!

    • @sohamsengupta6470
      @sohamsengupta6470 5 місяців тому +3

      As someone who wasn't around at the time, 80s and earlier hacker culture and tech people have been a bit of a fascination of mine for a while now, because of the sheer amount of stuff that they achieved with ridiculously limited resources and documentation. Loved your insight into the time and mindset. Cheers.

    • @BenjaminGriffin-r7b
      @BenjaminGriffin-r7b 5 місяців тому

      Do you do any writing?

  • @pvtvega
    @pvtvega 3 роки тому +194

    This is hands down the best explanation of low level computing I've ever seen. What an incredibly intuitive way to demonstrate these concepts. I can't imagine how much time and planning goes into these videos. Thank you!

  • @julianduniec
    @julianduniec 2 роки тому +338

    This project is 3% understanding the components, programming and circuitry, 97% trying to fold cables as neatly as Ben does.

    • @FictionsFantasia
      @FictionsFantasia Рік тому +12

      So true! i have no idea how he gets it so perfect everytime.

    • @TSPxEclipse
      @TSPxEclipse Рік тому +3

      How I did it for a little project I did in high school was to kind-of rough draft the path of the wire and then bend the corners with two pairs of small tweezers until the desired angle was achieved.

    • @wizardcoolio
      @wizardcoolio Рік тому +3

      they sell kits with perfectly bent jumper wires on amazon but it looks like he made his own which is scary

    • @YASHLIVEYT
      @YASHLIVEYT Рік тому

      lmao
      @@wizardcoolio

    • @subhimesto7123
      @subhimesto7123 Рік тому +4

      ​@@FictionsFantasiahe has a video explaining that called breadboard tips and trick

  • @Salehalanazi-7
    @Salehalanazi-7 5 років тому +496

    Sir you literally brought the computer science online learning experience to the next level, wow just wow

  • @g00st62
    @g00st62 5 років тому +3152

    "it just sits here succsefully doing nothing forever"
    well that sounds kinda like me...

  • @mmseng2
    @mmseng2 5 років тому +367

    Ben always makes me feel like a genius for even being able to follow along. A testament to his thorough teaching style and supreme editing skills.
    Now if I could just remember any of it.

    • @oddvertex9429
      @oddvertex9429 3 роки тому +4

      I feel that - I’m building along with him and I’m on the 5th video, everything’s working fine and I just came back to this video like “what’s so special about $6000, did we pick that or does the 6502 just throw stuff there?” Seriously so much fun I love it.

    • @Skibidi_Male_X
      @Skibidi_Male_X 2 роки тому

      I am a beginner and really enjoy his teaching style .I watch all his videos over and over .

  • @TangodownNZ
    @TangodownNZ 3 роки тому +30

    I love how you just use paper to illustrate what you are explaining and not some fancy animated videos. It really gives us that classroom experience. Thank you

  • @ashish_jb4
    @ashish_jb4 5 місяців тому +2

    I've learned assembly, bios interrupts, digital electronics, computer architecture. And I still feel revelations and concepts clicking into place when I watch your videos.

  • @patrickfalvey5251
    @patrickfalvey5251 5 років тому +375

    I typically don't leave comments on videos, but I'd like to make an exception here to personally thank you Ben. The content you are producing and allowing to be public for no charge is a service to the CS community that cannot be ignored. A sincere thank you for your efforts and service.

    • @virtualpilgrim8645
      @virtualpilgrim8645 2 роки тому +7

      If you claim to not "typically leave comments on videos", one can only imagine how much you felt compelled to overcome your fear. Thank you!

    • @fourohfournotfound
      @fourohfournotfound 2 роки тому +2

      A rare youtube commenter, how blessed we are.

    • @atlantic_love
      @atlantic_love 2 роки тому +8

      @@virtualpilgrim8645 LMAO!!!! Love your sarcasm :) Just don't expect him to respond. He's probably copy/pasted that thing in a bunch of videos, trying to get clout. I mean, it takes a certain level of narcissism to let everyone that you don't normally do something but that you'll make an exception. Barf.

    • @virtualpilgrim8645
      @virtualpilgrim8645 2 роки тому +3

      @@atlantic_love cheers😎

    • @malektahri5590
      @malektahri5590 2 роки тому +1

      @patrick falvey
      who cares about what you used to .

  • @infinitenex8165
    @infinitenex8165 5 років тому +3141

    so you're telling me that EA has been doing nothing successfully forever? Yeah, seems about right.

    • @CZghost
      @CZghost 5 років тому +222

      Coincidence that most hated games developer Electronic Arts has its abbreviation EA actually the same like 6502 NOP opcode? You tell me :D

    • @larva5606
      @larva5606 5 років тому +45

      Shots fired 👌🏼

    • @michaelgalarneau5253
      @michaelgalarneau5253 5 років тому +59

      as an Enterprise Architect, I represent that remark. :)

    • @buckstarchaser2376
      @buckstarchaser2376 5 років тому +30

      Gives some new perspective to the EA Sports commercials.

    • @bravefastrabbit770
      @bravefastrabbit770 5 років тому +48

      Dude how dare you talk shit about EA. They´ve implemented so many cool new mechanics in the past few years. Haven´t you heard of surprise mechanics?

  • @maylinare5782
    @maylinare5782 5 років тому +187

    I've just wanted to get this out:
    your video is AMAZING!
    I've always been into coding but never looked into it that deep. Your Video is really easy to understand and it really helps to understand how computers work deep in.
    So: Thank you for your amazing Videos!

  • @robokaos69
    @robokaos69 2 роки тому +94

    I think it's interesting how much abstraction there still is even at really low levels like this, in the form of how the actual physical construction and mechanism of chips and other components aren't particularly important to consider generally.
    The fact that modern computers can be operated as they do is insane.
    There are so many levels of depth you can go to.

    • @mridulagrawal2370
      @mridulagrawal2370 Рік тому +18

      Truly! It hit me around 17:43 when he was talking about how specific codes will perform specific tasks like damn how the hell did we get from transistors and capacitors to reading and *performing* hex instructions lol. And this was a processor in 1975!

  • @junkproduct
    @junkproduct 2 роки тому +5

    making something potentially so obtuse and hard to understand so crystal clear... no ads... i cant stress enough how good this is. hats off to you sir.

  • @viniciusvbf22
    @viniciusvbf22 5 років тому +105

    Ben Eater is the most competent person I "know" on demystifying how actual hardware works.

  • @LC-hq1vx
    @LC-hq1vx 4 роки тому +115

    I feel like I came to college seminar I wasn't supposed to be in and sat down and listened.

    • @manicminer4573
      @manicminer4573 3 роки тому +9

      And then realised it was much more interesting than the subjects you chose to take!

    • @fodk7021
      @fodk7021 9 місяців тому +1

      ​@@manicminer4573 relatable

  • @erasmobellumat3973
    @erasmobellumat3973 3 роки тому +81

    Even on computer science degree we don't get all of this concepts in practice. Your content is amazing!

  • @jameskelly2515
    @jameskelly2515 4 роки тому +10

    I just finished building the 6502 that I purchased from your site. I loved every minute of this project and learned so much. You have a gift for teaching. An unfortunate side effect of this project is that I have started talking to my family in machine instructions and ascii. I’ve tried many different ways of telling my 8 year old daughter to clean her room but it appears she doesn’t support that instruction.

  • @dimiutube
    @dimiutube 3 роки тому +4

    I stepped in accidentally but I could not stop watching! That’s so exiting 😳 I learned 6502 assembly language about 35 years ago but never tried to build never tried to write a program just using the CPU and some wires! It’s very motivating to try it by myself! Thank you very much!

  • @neilolif
    @neilolif 5 років тому +56

    Good grief, you are taking me back to the very beginning of my career. IBM Training for "CPU Logic Design." A whole year course starting with TUBE logic and working up to the 8086 and the 6502. Quite an adventure in 1975!!

  • @StuartWoodwardJP
    @StuartWoodwardJP 3 роки тому +12

    I like the way that you build up from the simplest thing that works. Sometimes people start off with something too complicated and when it doesn’t work get sidetracked. Starting with the the simplest program builds confidence that it is actually working as expected.

  • @TheMeldanor
    @TheMeldanor 3 роки тому +35

    WoW. This is one of the best tutorials to follow on how hardware programming actually works! I've written software for about ten years now and always struggeled to understand hardware programming. Your videos are easy to follow and digest. Thank you!

  • @vitorenes
    @vitorenes 3 роки тому +2

    I'm almost 50. I kinda lived through all the home computer revolution, and I started programming in BASIC when I was 9 or 10, in my brother's ZX81. I always wanted to really understand what was going on inside that little plastic box, and tried to find out and I hit the "machine language wall" head on. I thought it was so much over my capacity that for the next 38 or so years it would continue to feel like black magic-voodoo stuff to me - until a the moment I discovered this series of videos. NEVER BEFORE have I so clearly and quickly understand such an apparently complex subject as with this amazing teacher, and this is probably the first quite-fast-paced content ever produced that is actually crystal clear and easy to follow. THANK YOU, sir. I am sure life will properly reward such generosity.

  • @Dinnye01
    @Dinnye01 2 роки тому +15

    Ben, you were the one who got me into FPGA programming with these videos. Which, incidentally, influenced my carreer greatly. So... thank you!

  • @nathanglevy
    @nathanglevy 5 років тому +62

    Thanks for the great video Ben!
    A great part of the way you teach is that you also discuss how these things are applied in the real world. Your comments about the engineering tradeoff between efficiency in utilization and efficiency of the overall cost of the system are very true and something that is difficult to teach in a class, and yet you showed a very practical example of this. Things like this are what make your videos truly exceptional.
    I also really love how you leave in the mistakes and errors, even it be a missing wire or a missing bracket in the code - those are really important parts of building a system, and It's great that you include them in the videos. It's also a great message to be sending out to young budding engineers that are probably watching these videos too -- learning from the mistakes are what makes the final product ;)
    Looking forward to the next one, hope it comes soon!

  • @vapourmile
    @vapourmile 4 роки тому +224

    This is a very cool tutorial. Everything goes at the right pace and all the information is succinct without leaving anything out.
    As a 6510 programmer it did strike me that the program to flash the lights could have been:
    LDX #$55
    LDY #$AA
    LOOP:
    STX $6000
    STY $6000
    JMP LOOP
    As you can see in your demo also, the lights duration is not even. It's a like a square wave with an uneven duty cycle. So after it writes AA it holds for a perceptibly longer delay than $55 because the time it takes to perform the JMP is added to the timing.
    You could, if you liked, even it out by adding a JMP to the $55 write too, just for the sake of introducing an equal delay. This gives:
    LDX #$55
    LDY #$AA
    LOOP:
    STX $6000
    JMP SKIP
    SKIP:
    STY $6000
    JMP LOOP
    At an expense of three bytes this loop is slightly faster (by one clock cycle) and the lights stay on and off for the same duration. :)

    • @jacksonfev
      @jacksonfev 2 роки тому +13

      I was just about to say all that.

    • @waylelhoweris5649
      @waylelhoweris5649 2 роки тому

      Ok

    • @waylelhoweris5649
      @waylelhoweris5649 2 роки тому

      Kkooooooookoooonommomomookommoooookokookokokkokoomo ok oooonmookkookoomomomooomooomkomoooooomommkookookokommkoooooo oooomomookooookooommooomommmmookoooooommokokokkokok ok ok okmmkm ok oOlomouc ok kkkkokookkkkomomomokoomkmkmookkooooooko kokokomomommommo okkokmmomokkoookoooomoomomoommmommoomommooompkkookookokookkkokookookoooomoonomoommmmomookkokokoooooookookokkokookoookkokkkkokoomooomooomomomokoooookkkokmookooomookooookookoooookokoookmkooko

    • @waylelhoweris5649
      @waylelhoweris5649 2 роки тому

      You You okokooko on kokokooooomooookkkkk but but kkookookooookooookkokkokoooooookooookooookoookkkokookoookooookokkooooookkoookkkkkkkkkkkkoookomomoookkkomoooomkkkkkkkokkkookooooooooookokokkok kokokooookokokokokokooooookkoookkoookmkkkkkooooooookoo okokooooookookoookkkokkkkkkkkkokokoooooooooookokookmmkkkkkkkkkkkkkkkkkkokkk no kokoooooookkkokkkkkkkookkokkokopokmmmkkkkkkkkookkokmooo mmkoook know ok kkkkkmokkokokk k ok kokkkomokkmkkkkkkkkkmkkkkkkkkokkkkkoookmmmkkk mkkkkkmkkkkkkkkkkkkkkkkkkk kkkkkkokkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkokkkkkkkkkokmkkkkkkkkkkkkkokkkkkk km kkkkokkookkkkkkkkkk look ok kkk kkkk ok kkk oki ok o k ok okkk kikoo kk kkkkkk mok ookkk no okkkkkkook on kkk

    • @waylelhoweris5649
      @waylelhoweris5649 2 роки тому +1

      Look ik k look ik ki ko ok look kkkkk look k ooo ok on ooo ok lookout look kookook ok ok ok

  • @Zuudo
    @Zuudo 5 років тому +41

    I like how the Python syntax error wasn't edited out of the video. Even the best of us make mistakes!

    • @Navigator87110
      @Navigator87110 5 років тому +6

      Right? I was thinking: How can he do everything so perfectly?

    • @howardbaxter2514
      @howardbaxter2514 4 роки тому +2

      @@Navigator87110 no programmer is perfect. Even the best make mistakes. I like watching Code Bullet as well because he likes to go ballistic over his syntax errors.

  • @KE0RM
    @KE0RM 2 роки тому +3

    Hey Ben, I just received my 65C02 kit and I'm anxious to get started. Since watching your videos I've gained a lot more understanding about how computers work. I've been in IT for 27 years and never understood it as much as I do now. Thank you for all you've done.

  • @luckyizzac
    @luckyizzac 2 роки тому +4

    The feeling when you watch this video again after months then somehow understand it better than before... so good

  • @DC-ox4rc
    @DC-ox4rc 5 років тому +971

    Are these videos legal because they are extremely addictive

    • @reddunkey9267
      @reddunkey9267 4 роки тому +1

      Fala portuguese

    • @reddunkey9267
      @reddunkey9267 4 роки тому +1

      Assembly needed

    • @victorcubas7248
      @victorcubas7248 4 роки тому +15

      This is as addictive as that video on FB of a jungle dude building a house.

    • @kenan2386
      @kenan2386 4 роки тому +7

      Me and the bois watching ben eater at 3am

    • @nonagone9570
      @nonagone9570 3 роки тому

      @@kenan2386 its 5:30 and i want to go to sleep but its sooo good. Help!

  • @AlexDanut
    @AlexDanut 5 років тому +475

    "so it just sits here, successfully doing nothing, forever"
    i want this on my gravestone

    • @tbbw
      @tbbw 5 років тому +23

      "NOP" on a gravestone.
      I need to check local gravestones next summer if there are any geek jokes on em.

    • @emilio88regis
      @emilio88regis 5 років тому +9

      @@tbbw I think something like "DI HLT" will be better.

    • @menyasavut3959
      @menyasavut3959 4 роки тому +5

      You will GOSUB without RETURN

    • @djaydeved
      @djaydeved 4 роки тому +5

      no put
      "6502 ea"
      edit: or the binary for it

    • @kenan2386
      @kenan2386 3 роки тому +2

      Nah
      Life:
      jmp Life
      DONT JUDGE I AM BAD AT ASM

  • @fightocondria
    @fightocondria 5 років тому +351

    There it is. An EA processor. It's a fundraiser. I knew there was going to be DLC.

    • @thyTwilightGoth2
      @thyTwilightGoth2 5 років тому +12

      Finally Found the EA Comment!

    • @slendeaway7730
      @slendeaway7730 5 років тому +2

      TreeLC

    • @michalnemecek3575
      @michalnemecek3575 5 років тому +14

      It's kinda funny that the instruction that does nothing is EA

    • @jarisipilainen3875
      @jarisipilainen3875 5 років тому

      not even funny. EA is NOP only on this CPU it is something else on other CPU and EA is number they are not letters. i cant even mix them up on my brain

    • @wolverine9632
      @wolverine9632 5 років тому +13

      @@jarisipilainen3875 r/woosh

  • @noiz1709
    @noiz1709 2 місяці тому

    I just finished the first chapter after building the bare minimum 65C02 setup and your 555-based clock module.
    I sat there for minutes watching the program counter increment with the LEDs connected to the address lines after hardwiring NOP to the data bus. Absolutely mesmerizing experience.
    Thank you for this amazing tutorial. I’ll definitely go on with the more advanced chapters!

  • @davidblake6889
    @davidblake6889 3 роки тому

    I have just found your channel. I would like to say how much I enjoyed seeing this again. Thank you. Over 40 years ago, I was doing exactly what you are doing now, but I was using a 6800 processor, with its associated peripherals.. It was all very new. I had nobody to teach me how to do it. It was a very steep learning curve with the tools we had available. No prewired breadboards. No internet, no computers, no programmers for the EPROMs (UV eraseable). I had to make my own programmer. It had three power lines, and took several passes to program a 1k EPROM. All done in machine code. Branch offsets were interesting. I made a complete radio-paging control system to operate up to 1000 radio pagers using this method. It is amazing what we could do back then with such small systems. An amazing bit of nostalgia for me. Thanks again.

  • @rafabulsing
    @rafabulsing 5 років тому +23

    You know there are a lot of wires when even Ben Eater gives up on putting them all in right angles :p
    Absolutely amazing content as always, thanks for being an inspiration!

    • @abcrtzyn
      @abcrtzyn 5 років тому +1

      Rafael Bulsing usually it means it’s temporary, who knows

  • @sevenhong5809
    @sevenhong5809 4 роки тому +27

    Your stuff is way much better than classes I took in college. Huge respect.

  • @gemazarusgaming1549
    @gemazarusgaming1549 3 роки тому +3

    I've always been fascinated with electronics like this. Despite no prior education on what I just watched I was able to understand everything you said. You have a gift. To be able to deliver such complex material to newbs like me and to give me the confidence to give it a go, (finally). I thank you very much.

  • @AIJenkins
    @AIJenkins 2 роки тому +2

    The best intro to hardware level CPU programming I’ve encountered. Full kit ordered, looking forward to the retro build and experience. Thanks!

  • @BigGuy8059
    @BigGuy8059 Рік тому +3

    Very nice presentation! Very clear, and this should be required for anybody thinking about getting into digital design. I started working with the 6502 pre-Apple, so I know it well. I still remember a lot of the opcodes! Decades later I was verifying the chip design for a four channel 100 mbit/sec DSL chip, writing ARM bootloader code for a 256 processor chip, and using big FPGAs. One correction though: The TI version of the 8008 microprocessor was first sold in January of 1971, and thus started the personal computer revolution. The 6502 did not come out until 1975. It was a lot cheaper and easier to use, but homebrew fanatics were building 8008 and then 8080 computers before that.

  • @unbeirrbarde
    @unbeirrbarde 5 років тому +4

    That gives me so many memories. I spent whole weeks writing word processor and graphics programs in 6502 assembler. Really beautiful language. Clear and effective.

  • @nullFoo
    @nullFoo 3 роки тому +4

    I'm amazed at how well you're managing to make me understand this, usually when I watch videos like this it all goes over my head but you are explaining really well

  • @mikhailanisimov2160
    @mikhailanisimov2160 5 років тому +1273

    Uses semicolons in python. This guy is savage!

    • @BenEater
      @BenEater  5 років тому +603

      I guess I've written too much JavaScript recently. I completely didn't see that at all until after the entire video was done. Oh well.

    • @bradleystach6275
      @bradleystach6275 5 років тому +195

      I do that in python all the time. 25 years of writing C++ will do that to you. I end up with perens around all my if statements when I write VHDL also. Old habits die hard. 🙂

    • @aaron41
      @aaron41 5 років тому +113

      I recently submitted a pull request to a python library eliminating thousands of semicolons. xD (we'll see how the author feels about it...)

    • @skilz8098
      @skilz8098 5 років тому +33

      I like it! Coming from a C++ background and just recently started to learn Python...

    • @brantwedel
      @brantwedel 5 років тому +125

      @@BenEater There is an entire dark underworld in JavaScript where people don't use semicolons 😂

  • @misterspike
    @misterspike 4 роки тому +4

    Just wanted to say "Well done, sir!" This series has been quite perfect so far! You have obviously put in huge amounts of work creating your script, filming, editing, and narrating this, but it comes across as effortless, and with just the right pace so that we can easily follow along and understand what you are doing without feeling rushed, and without our attention lagging! You are REALLY good at this!
    I learned this the hard way many many years ago, but since I haven't done anything with that knowledge since then, it has all mostly evaporated. This has been a wonderful refresher. Not that I expect to do anything with it, but it's nice to know that I could!
    I really am surprised at how well your pacing and thought process anticipates my own! Not only do you understand your topic extremely well, you also understand your viewers/students and their needs, too!

  • @ΝίκοςΛαδιάς
    @ΝίκοςΛαδιάς 3 роки тому

    As an electrical engineering student , I have found computers and microchips just overwhelmingly more interesting through your very discriptive and enlightening videos than my university's classes. You have helped me deeply understand how a microprocessor and an EEPROMs or RAMs work , as well as what are the real applications of analog electronics performing digital applications and computations. I Have been motivated and thrilled watching your videos! Keep it up!

  • @vaio232
    @vaio232 4 роки тому +5

    This guy is in a whole new level, does coding, scripting in hand and got the 6502 opcodes on his head and math on the other. I mean this is seriously multi talented. Not to mention being a good teacher with marketing skills in youtube

    • @kungfreddie
      @kungfreddie 2 роки тому +1

      If you program 6502 you get the opcodes learnt quickly.. I did it when I was 10-12 on my c64 and u had it all in ur head.. the opcodes u use for most things are not very many. 6502 had very limited amount of opcodes. Or wait I mean Instructions.. he didn't have the opcodes in memory he looked them up.. as anyone would.
      When u start something early it just get stuck.. I have not done a c64 program in 36 yrs , but I know I put them at $c000 usually.. and I think that's sys 41962 to start .. damn I was wrong.. it was 49152 , but I was very close !

  • @dmsalomon
    @dmsalomon 4 роки тому +214

    Could you show how you are able to cut the wires so perfectly? Doesn't need to be a dedicated video, just show a little footage of you doing it. The people want to know!

    • @slimxshady6111
      @slimxshady6111 4 роки тому +30

      I learned a trick of laying the wire down on the breadboard of where you want to connect it. Then, using either a fingernail or a pen, make a small mark on the wire rubber for where you want it to plug into the breadboard.
      Now fold the wire at the marks 90 degrees, and then strip the wire. Boom! You have a perfectly straight looking breadboard wire.

    • @shr6482
      @shr6482 4 роки тому +14

      there are shops selling precut wires with varying lengths specifically for breadboard use. Pretty handy to have one set of it.

    • @byakka
      @byakka 3 роки тому +4

      ua-cam.com/video/PE-_rJqvDhQ/v-deo.html

    • @SustainedFuture
      @SustainedFuture 2 роки тому +13

      I see this is a really old comment, but in case anyone else comes across it, Ben actually made a video about how he cuts and bends all his wires: ua-cam.com/video/PE-_rJqvDhQ/v-deo.html

    • @mridulagrawal2370
      @mridulagrawal2370 Рік тому

      @@SustainedFuture I literally searched 'wire' with ctrl + f to find a similar comment loll thanks a lot!

  • @vaendryl
    @vaendryl 5 років тому +85

    just seeing your wiring-fu, I'm already certain you'd be great at factorio.

    • @Mythricia1988
      @Mythricia1988 5 років тому +4

      Secretly he prototypes these circuits using combinators.

    • @jmullentech
      @jmullentech 5 років тому +3

      "Just one... more... refactoring. Then I can sleep."
      Just when I thought I had kicked the habit. Dammit.

    • @zach2047
      @zach2047 4 роки тому +3

      He would never have enough iron for all the combinators he needs!

  • @The-python-guy
    @The-python-guy Рік тому +2

    This is hands down the best playlist for hobbyist computer building! truly amazing stuff -thanks Ben!

  • @useless.production
    @useless.production Рік тому +11

    Ben, I can't explain how much I love your videos! I'm an 8th grade student, and I'm doing an NHD project all about the 6502 and this has been so incredibly helpful! Thanks for everything, and keep up the great work!

  • @lxathu
    @lxathu 5 років тому +8

    Your dedication and the quality of your work is impressing - although I've almost never dared to try them at home.

  • @daleowens7695
    @daleowens7695 3 роки тому +22

    You're providing an invaluable service to society. Not many people, I feel, are capable of making such a claim. Thank you for your hard work, I've learned a great deal from you.

  • @3vi1J
    @3vi1J 5 років тому +4

    These videos are always worth the wait. I only wish UA-cam had existed when I was a kid - Ben would have saved me years figuring out things the hard way.

  • @mrbigheart
    @mrbigheart 4 роки тому +2

    I cannot even begin to explain how useful and interesting all this is.
    It ties up so many things I read about over the years, on my own.. but since I didn't have any technical background.. kind of floated somewhere.
    But seeing this, ties lots of things together.
    Great content and greatest way of explaining things in lots of detail.
    Thanks so much! Awesome job you're doing here!

  • @josgraha
    @josgraha 2 роки тому

    this is awesome, takes me back to middle school days but instead of pouring over manuals and getting confused, got a real pro sorting it all out. thank you sir!!!

  • @Slider68
    @Slider68 3 роки тому +3

    Wow does this video bring back memories. Almost 45 years ago the 10 year old me received my first PC, an Apple II. Over a couple of years I learnt to program the 6502 directly in hex (quickly). I still recall all of the opcodes you used, even though I haven't used them for almost 40 years.
    In addition to opcodes for some reason I still recall C600-C6FF was slot 6 ROM (floppy disk), C000-CFFF I/O in general, C020 tape output toggle, C030 speaker toggle (also CALL -16336), C060 tape input volume level,
    0400-07FF text/Lres 1, 0800-0AFF text/Lres 2,
    2000-3FFF HDres 1, 4000-5FFF HDres 2, etc.
    One of the "entertaining things to do" was to false boot the floppy, modify the load instruction to save registers, text 1 memory, etc followed by RTS (60) (all directly in hex) and eventually save everything to tape. After booting DOS, load the program from tape, save the program to disk and write a 6502 program to reset registers, text, etc to complete the floppy load.
    Some interesting features that some of the more advanced encrypted floppy disk loaders used included stepping the floppy head 1/2 and 1/4 sectors while continuously reading and using undocumented 6502 opcodes that would do bizarre things (like XOR'ing registers while dropping the most significant bit and using the result for a relative jump, after sending a carriage return to text page 1 start executing at $0500 (memory for text page 1), etc).
    After a few years I got interested in vehicles and went into mechanical engineering...

    • @kungfreddie
      @kungfreddie 2 роки тому +1

      Yea wasn't xor part of 6502? But when I saw a list right now they only had eor listed... I remember we used xor to clear registers since it was the fastest way on 68000 programming (doing demo programming every clk cycle counted). But I'm sure it was there on 6502 too...

    • @ducksonplays4190
      @ducksonplays4190 Рік тому

      @@kungfreddie XOR and EOR are the same, XOR is eXclusive OR and EOR is Exclusive OR.

  • @2Sor2Fig
    @2Sor2Fig Рік тому +18

    14:27 When cross-compiling my python code to run on Android (Kivy + Buildozer), one of the things clang checks for is whether the target platforms uses little endian or big endian. It's one of those things I've seen and wondered about while idly watching my terminal, waiting for everything to compile. I never thought this is how I'd learn what that was all about. Thank-you for all your videos.

  • @WintonMc
    @WintonMc 3 роки тому +4

    It's been a year since you posted these videos so I'm feeling like a bit of a "Johnny come lately", but OMW, I had no idea UA-cam videos could be so addictive.
    It's been 40 years since I started using computers. Now at last I am truly understanding what went on inside my Commodore Vic20, and pretty soon I'll have a grasp of just how many times it happened.
    Awesome series Ben. Thanks for making it.

  • @michaelkuhn402
    @michaelkuhn402 Рік тому

    I'm a retired Visual Basic and SQL programmer and NEVER KNEW how the details worked. Now I do. Fantastic video.

  • @cac2244
    @cac2244 3 роки тому

    i watched the whole thing without even knowing what I was lookin at... clean wiring got me hooked.

  • @evilotis01
    @evilotis01 5 років тому +20

    literally shouted "yesssss" when i saw this in my feed. not ashamed.

  • @itwsntme
    @itwsntme 5 років тому +34

    A while back I was watching One Lone Coder's NES Emulator project videos. He was describing how the NES memory is mirrored. The address space is 8K, but the system only has 2K for its sprite data (if I remember correctly). He explained that the data was mirrored four times, which each memory location accessible at four different addresses, something he had to reproduce in his emulator.
    As a software guy first, I was racking my brain as to what could possibly be the purpose of such architecture.
    Later, in another video about the NES hardware I learned why; Nintendo simply left two lines of the address bus disconnected because it was the cheapest thing to do. So, as Ben was saying, these are the tradeoffs hardware engineers do.

    • @kungfreddie
      @kungfreddie 2 роки тому +1

      My first computer.. the vic20 i got at 7 yrs old was 2k.. or maybe 4k .. i dont remember exakt.. but it wasnt more than 4. The games were amazing! Hehe.. atleast for a 7 yr old that only seen pong b4..

    • @marsovac
      @marsovac 2 роки тому

      They are not disconnected but connected to the cartridge slot, so a cartridge can choose what to do with them, and some later ones did.

  • @JC50000000
    @JC50000000 5 років тому +740

    When is a video coming out on how he gets his cables so perfectly sized :D

    • @famitory
      @famitory 5 років тому +30

      they have these things that look like little Christmas trees that you can get for this. basically you use them as a guide for cutting to length and then again for bending the ends

    • @karimjerbi7084
      @karimjerbi7084 5 років тому +9

      what are these Christmas tree looking things named?

    • @ke4est
      @ke4est 5 років тому +13

      @@karimjerbi7084 or do like Ben does and buy this: www.ebay.com/itm/140Pcs-U-Shape-Solderless-Breadboard-Jumper-Cable-Wire-Kit-For-Arduino-Shield/222743986356?epid=1241689374&hash=item33dc9380b4:g:R-MAAOSwoYhaJcBX:sc:USPSFirstClass!28906!US!-1

    • @srivatsajoshi4028
      @srivatsajoshi4028 5 років тому +3

      @@ke4est probably not. They just come in standard sizes but he needs some custom length

    • @ke4est
      @ke4est 5 років тому +2

      @@srivatsajoshi4028 True, but this will get him started. I make my own custom ones. I just bend to where I need, mark it and then cut and strip. 😀

  • @freeelectron8261
    @freeelectron8261 4 роки тому +2

    Ben is a brilliant educator! So clear concise and yet interesting. Thank you Ben Eater!

  • @abdulazizal-assaf9588
    @abdulazizal-assaf9588 2 роки тому +1

    I`ve studied programming and electronics for several years now, BUT this is by far the best lesson I`ve had in those years in terms of easily understandable. It`s my first time watching your video, but it definitely won't be the last.

  • @TimothyChapman
    @TimothyChapman 5 років тому +151

    Add 3 NOP instructions between the two writes of 55 and AA. That'll give you a 50% duty cycle for those LEDs.

    • @DolganoFF
      @DolganoFF 5 років тому +6

      Hey, I was going to write this :)

    • @tiikoni8742
      @tiikoni8742 5 років тому +12

      But NOP instruction took 2 clock cycles to execute. So 3 would be too much?

    • @cringium
      @cringium 5 років тому +3

      i dont get what this means

    • @brianmiller1077
      @brianmiller1077 5 років тому +7

      @@cringium Timothy is suggesting that some delays be added between switch the red LEDs back and forth from 010101 to 1010101. I don't think it'll do what he's suggesting though. Ben's manually controlling the clock.

    • @cringium
      @cringium 5 років тому +3

      @@brianmiller1077 i now understand more but not fully.

  • @raptorekpl
    @raptorekpl 5 років тому +142

    “Some random value”... 42 :D

    • @joey199412
      @joey199412 5 років тому +7

      42 hex is 66 in decimal

    • @andysyme8507
      @andysyme8507 5 років тому +27

      @@joey199412 But 42 is the answer to life, the universe, everything! (i don't recall if it was specified whether that was decimal or hex :-) )

    • @DrathVader
      @DrathVader 5 років тому +11

      It's also 101010 in binary

    • @DrathVader
      @DrathVader 5 років тому +5

      @@fred-2.7182 Whoops
      disregard that, I converted dec 42 instead of hex 42

    • @philiparny3178
      @philiparny3178 5 років тому +1

      @@andysyme8507 actually there was code corruption (bathing captains and telephone sanitizers overwrote part of the original program) so as I understand it, 42 is ?probably? not the answer to life etc.

  • @blitzer2062
    @blitzer2062 2 роки тому +5

    I learnt some (but definitely not all) of this content at high school in 1981. I really wish I'd have had this video back then. This was a great trip down memory lane and so beautifully explained. Thanks Ben.

    • @danny_racho
      @danny_racho 2 роки тому +1

      At highschool? This is some advanced microcontroller knowledge. I only did this at the university at some classes,
      Why would anyone teach this at high school? This is odd and not really useful, since very small percentage would follow this and actually be interested in it

    • @Nick-ui9dr
      @Nick-ui9dr 2 роки тому +1

      Why u guys fighting... In 1981 I dint even knew if there is something called computer. 😂
      Though I too was in 9th standard I guess. 😀

  • @Slava_tobi_Ukraine
    @Slava_tobi_Ukraine Рік тому +2

    FFFC(1 byte) 00(1byte at FFFE) FFFD(1 byte) 80(1byte at FFFF) =>next adress is 0000(or set by us 8000) in up memory adresses 8000-FFFF. Thanks a lot, I understood how RESET work.

  • @glsky
    @glsky 2 роки тому +1

    ngl i have no idea what kind of video this is, i just watch videos to sleep and this knocked me out so thank you

  • @manvindarsingh
    @manvindarsingh 5 років тому +9

    You're the professor we need at universities

  • @danielfogli1760
    @danielfogli1760 4 роки тому +13

    Love your "paper-cutout-building-blocks-step-by-step-hey-there's-our-circuit" approach 😉

  • @TomStorey96
    @TomStorey96 5 років тому +10

    Something to be careful with in respect to hard wiring the OE/ signal low and relying solely on CE/ is if you accidentally try to write to the ROM address space. If the two devices are driving different voltages on some signals then you could essentially create a short between your power rails.
    In this case you could take the Rw signal and hook that into the NAND being used for CS/ along with A15 so that the ROM would only be selected during reads in it's address space.

    • @kalj7
      @kalj7 5 років тому

      This was my thought too. It is really all about connecting one extra wire :P

  • @KeithStarr696969
    @KeithStarr696969 4 роки тому +1

    Simply put, this should be a course requirement for any computer software/hardware education.
    You provide the details when necessary and skip over the parts that would cause you to lose some of your audience.
    Extremely good work. Thank you for spending so much of your personal time in the making of this work of art!

  • @batista98854
    @batista98854 2 роки тому

    Fantastic Ben Sir. Many Engineering students like me in India are going through your videos. Your videos are the best videos on UA-cam. No one explains so much in details as you do. THANK YOU!!!!

  • @TeknozFR
    @TeknozFR 4 роки тому +20

    As a software engineering student, I've always been scared of CS. Your videos made me understand so many concepts regarding how computers actually work. Amazing videos, easy to follow. I'll recommend them to all my programmer friends!

    • @quinndtxd
      @quinndtxd Рік тому

      This is closer to computer engineering than computer science, in my opinion

  • @hugotavares1410
    @hugotavares1410 3 роки тому +4

    I've learned more with each one of your videos than in my whole classes on Microprocessors.
    Congratulations on your awesome work!

  • @TheMrRuttazzo
    @TheMrRuttazzo 5 років тому +61

    Keep in mind, this is the same stuff that evolved into Star Citizen, the X series, Final Fantasy XV or GTA V about 45 years later...

  • @beni9129
    @beni9129 2 роки тому +1

    Im a Computer Science Major in college and normally this deep dive into computation bores me, and quite honestly your videos feel a lot like my schools COVID lectures, yet, Im finding myself REALLY enjoying this stuff. Thank you!

  • @dennisgreiwe2078
    @dennisgreiwe2078 3 роки тому

    Ok, a thank you is in order. A BIG thank you!!! 30+ years of trying to put all of this random knowledge I have of coding, electronic componentry, logic gates etc... Into something I might be able to make a hobby out of or even a career if I had started with this video 20 years ago...
    It is now all coming together in a understandable matrix of knowledge bits in my brain..., I have to admit, you might be the best teacher of this sort of thing that I have ever run across. Thank you so much, you truly dont know how frustrating it has been for me to find information like this that satisfies my curiosity/desire to know more. Now that it is all starting to make sense, I'm a bit depressed because I think I might have had a different career altogether if I had even close to something like these videos two decades ago to help me understand.
    Edit: After I wrote that I realized the most important thing in computer science. Keep learning, You dont know what you don't know and you really don't know for sure what you do know until you need it. So maybe I was wrong, CS is all knowledge that is built upon other knowledge whether you are standing on the shoulders of giants that came before you or if you figure out some minor bug by yourself it can be counted as knowledge gained... So maybe Im not as depressed as I thought I was.

  • @markreed9937
    @markreed9937 4 роки тому +4

    My head hurts...but this video is so well made! Step by step I am starting to see how this all work. Thanks. :)

  • @mutated__donkey5840
    @mutated__donkey5840 5 років тому +103

    W A R N I N G : F I R M W A R E I S O U T O F D A T E .

    • @slonkazoid
      @slonkazoid 4 роки тому +15

      "The firmware will decide your fate"
      *"I AM THE FIRMWARE"*

    • @qazxsw21000
      @qazxsw21000 4 роки тому

      @@slonkazoid this comment feels like a massive Ayreon reference
      “I will grow, know my name
      I am hope, I am the ‘Frame
      I advance up from the deep
      A new chance, the March of the Machines”

    • @slonkazoid
      @slonkazoid 4 роки тому +4

      @@qazxsw21000 sry but no

    • @ностромов
      @ностромов 3 роки тому

      "Advance up from the deep" is Jam Baxter - Brains, "Deep aquatic excavator" @ua-cam.com/video/P4l36YrHw2w/v-deo.html ;$

  • @sabrinapyles563
    @sabrinapyles563 2 роки тому +5

    "So it just sits there, successfully doing nothing forever." Living the dream.

  • @ASOTFAN16
    @ASOTFAN16 3 роки тому +1

    Totally unrelated to the video itself, but I just have to say that you are absolutely amazing for listing all the parts of this mini series in the description like that. People could seriously learn a thing or two from you

  • @Bermis482
    @Bermis482 6 місяців тому

    Thank you Ben! Can not even explain the joy and astonishment these video series produce deep inside my soul! This is just beautiful to see all this machine code and all the points finally connected!!!

  • @keithnorris6348
    @keithnorris6348 Рік тому +5

    Very enjoyable for me it was like a trip down memory lane to my first work as a young man. The Commodor PET programing for interface operations. Ah, the bloody great big transformer, the cassett tapes, those wern`t the days. I think I`ll subscribe.

    • @kdog3908
      @kdog3908 Рік тому

      Having similar vibes! Was VIC20 for me. As soon as I saw those LDAs and STAs I felt like i'd peered through a time portal into my early youth!

  • @furroy
    @furroy 5 років тому +28

    i love how every wire ben picks up is perfectly bent to the exact shape needed. what is this witchcraft ?!

    • @gorillaau
      @gorillaau 5 років тому +10

      He breadboards the circuit and then pulls it apart to build it again on camera.

    • @electronichaircut8801
      @electronichaircut8801 3 роки тому +2

      This witchcraft is called preparation.

  • @lemonglataitor2123
    @lemonglataitor2123 5 років тому +5

    Oh my he made another great video, thank you for making such detailed videos.

  • @michael195b
    @michael195b 2 роки тому

    Stumbled across your channel while browsing. I used to be into this 30 years ago when at school but my career went in a different direction. Excellent video and very well explained, think I'll start it as a hobby again.

  • @Neverforget71324
    @Neverforget71324 Місяць тому

    Back around 1993 I taught myself assembly language (and C++). I got pretty good at it and wrote a few games, entirely in assembly language.
    I really enjoyed it because it was a great challenge and it taught me a lot about the hardware and computing architecture as well.
    After getting married, I largely abandoned it (wife, kids, jobs and such), but you have renewed my interest. I may just pick it up again!

  • @pial2461
    @pial2461 5 років тому +21

    Just waiting for this so long!:)

  • @js72634
    @js72634 Рік тому +7

    "It just sits here successfully doing nothing forever." LOLOLOL I want this on a tee-shirt or something. I think that's the most delightful thing I've heard all week.

  • @adrian_sp6def
    @adrian_sp6def 5 років тому +54

    I really like to see when You connect this setup to Your vga card that You create a few videos before.

    • @timh.6872
      @timh.6872 5 років тому +3

      I suspect that will be a very long while away, but I would like to see it happen eventually.

    • @adrian_sp6def
      @adrian_sp6def 5 років тому +6

      @@timh.6872 In my opinion this should be not very hard task to accomplish. Almost all necessery elements to done this are alredy presented. There is two ways know by me:
      1. connect vga card with cpu via memory map, like c64 does.
      2. connect vga card with cpu via ports, like nes does.
      Only one thing is needed to have in mind which is race condition between cpu and vga to access video ram.

    • @markkeilys
      @markkeilys 5 років тому +3

      @@adrian_sp6def just prefer the write to the read and worst case a new pixle will be off for a few hundred scans... probably not that noticable.

    • @DFX2KX
      @DFX2KX 5 років тому +4

      you have to connect the CPU to a RAM chip to make that possible, but it is certainly doable.

  • @astrobullivant5908
    @astrobullivant5908 4 роки тому +1

    Honestly, this is one of the most underrated videos on UA-cam.

  • @JB-th4bx
    @JB-th4bx 2 роки тому +1

    I'm an EE, and I took a computer organization class in college where I wrote assembly, etc. I wish they would've taught us the basics like this. This is really great.

  • @stomah9832
    @stomah9832 5 років тому +12

    invert the r/w line and connect it to the output enable pin of the rom
    this way you are not going to fry something if you try to write to the rom

    • @kalj7
      @kalj7 5 років тому

      I was thinking about this too. Easiest is to just use the existing NAND connection to the Chip Enable pin of the EEPROM, and change it so that R/W goes to one input rather than a15 to both. Feels safer.

  • @vieuetcon
    @vieuetcon 5 років тому +6

    Reminds me early years.. :) Dont know why after like 35 years I still remember that 21h on Z80 is LD HL, maybe coz its my first cpu and my first codings.. I was 12 y/o.

  • @noir371
    @noir371 3 роки тому +2

    It never ceases to amaze me how much he knows. Inspiring

  • @nidhinkk3091
    @nidhinkk3091 3 роки тому

    Subscribed, I m an Embedded developer from India, this really helps to understand how code works. Recently lost an interview. The question that caught me was about what's happening inside compiler. I answered high-level language converted into machine level. But not convinced, was asked to explain Linking, I have never cared about wts happening inside compiler. Busted!

  • @demogorgonzola
    @demogorgonzola 5 років тому +11

    19:27 ``W 42`` Ben makes Deep Thought ... Deep Thought gave the Answer.

    • @MrSapps
      @MrSapps 5 років тому +1

      @Michael Bishop This is 0x42 not 42, so almost ;)