How do CPUs read machine code? - 6502 part 2

Поделиться
HTML-код
  • Опубликовано: 1 ноя 2019
  • Schematics, datasheets, kits, and more at eater.net/6502
    Part 1: • “Hello, world” from sc...
    Part 2: This video!
    Part 3: • Assembly language vs. ...
    Part 4: • Connecting an LCD to o...
    Part 5: • What is a stack and ho...
    Part 6: • RAM and bus timing - 6...
    Part 7: • Subroutine calls, now ...
    Support these videos on Patreon: / beneater or eater.net/support for other ways to support.
    ------------------
    Social media:
    Website: www.eater.net
    Twitter: / ben_eater
    Patreon: / beneater
    Reddit: / beneater
    Special thanks to these supporters for making this video possible:
    Adam Lininger
    Alex Catchpole
    Andrew R. Whalley
    Anthony Cuccia
    Armin Brauns
    BakerStaunch
    Beau-James Erion
    Ben Dyson
    Ben Kamens
    Ben Williams
    Bradley Pirtle
    Brian Wanda
    Carlos Ambrozak
    Christopher Blackmon
    Clayton Parker Coleman
    Daniel Tang
    Dave Walter
    David H. Friedman
    David Turner
    Dean Winger
    Debilu Krastas
    Dušan Dželebdžić
    Dzevad Trumic
    Eric Brummer
    Eric Dynowski
    Eric Twilegar
    Erik Broeders
    Eugene Bulkin
    Foaly
    fxshlein
    Gabriel Lafond-Thenaille
    HaykH
    hunter wright
    Ian Tait
    Ivan Sorokin
    Jackson Warren
    JavaXP
    Jay Binks
    Jayne Gabriele
    Jeremy A.
    Jeremy Wise
    Jimmy Campbell
    Joel Messerli
    Joel Miller
    Joern Heidenreich
    Jordan Scales
    Joshua King
    Justin Dubs
    Justin Duch
    Kent Collins
    Manne Moquist
    Marcus Classon
    Mats Fredriksson
    Michael
    Michael Burke
    Michael Garland
    Michael Tedder
    Miguel Ríos
    Nathan Wachholz
    Nicholas Moresco
    Nick Sutton
    Nick Wrightsman
    Onion Sniffer
    Paul Pluzhnikov
    Paul Randal
    Peter Simard
    Randy True
    Rob Bruno
    Robert Blackshaw
    Robert Butler
    Sachin Chitale
    Scott
    Sergey Ten
    SonOfSofaman
    Stefan Nesinger
    Stefanus Du Toit
    Stephen Smithstone
    Steve Jones
    Steve Gorman
    Steven Pequeno
    Thomas Ballinger
    Tom Burns
    Vladimir Kanazir
    Warren Miller
    xisente
    Örn Arnarson

Комментарии • 2,2 тыс.

  • @julianduniec
    @julianduniec 2 года назад +289

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

    • @FictionsFantasia
      @FictionsFantasia 10 месяцев назад +12

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

    • @TSPxEclipse
      @TSPxEclipse 9 месяцев назад +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 9 месяцев назад +3

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

    • @gamingbeast8354
      @gamingbeast8354 8 месяцев назад

      lmao
      @@wizardcoolio

    • @subhimesto7123
      @subhimesto7123 8 месяцев назад +4

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

  • @c14n_
    @c14n_ 4 года назад +5011

    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 4 года назад +34

      so true, Ben Eater is modern day Ra

    • @pahvalrehljkov
      @pahvalrehljkov 4 года назад +1

      what kit do you use?

    • @mistsu1171
      @mistsu1171 4 года назад +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 4 года назад +10

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

    • @pahvalrehljkov
      @pahvalrehljkov 4 года назад +2

      @@c14n_ thank you...

  • @REDPUMPERNICKEL
    @REDPUMPERNICKEL 3 года назад +71

    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 года назад +1

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

    • @mrbrown6421
      @mrbrown6421 2 года назад +2

      @@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 года назад +3

      @@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 Месяц назад +1

      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.

    • @user-qu5rs8zu7b
      @user-qu5rs8zu7b Месяц назад

      Do you do any writing?

  • @LC-hq1vx
    @LC-hq1vx 4 года назад +100

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

    • @manicminer4573
      @manicminer4573 3 года назад +8

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

    • @fodk7021
      @fodk7021 5 месяцев назад +1

      ​@@manicminer4573 relatable

  • @willpreston6881
    @willpreston6881 4 года назад +2282

    Your breadboard wiring cleanliness is frustratingly good.

    • @drewbrown1534
      @drewbrown1534 4 года назад +80

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

    • @neilolif
      @neilolif 4 года назад +61

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

    • @tenstairs
      @tenstairs 4 года назад +65

      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 года назад +15

      Truly r/cableporn material

  • @g00st62
    @g00st62 4 года назад +3103

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

  • @pvtvega
    @pvtvega 3 года назад +191

    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!

  • @TangodownNZ
    @TangodownNZ 2 года назад +25

    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

  • @Salehalanazi-7
    @Salehalanazi-7 4 года назад +490

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

  • @patrickfalvey5251
    @patrickfalvey5251 4 года назад +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 .

  • @robokaos69
    @robokaos69 Год назад +89

    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 Год назад +17

      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!

  • @erasmobellumat3973
    @erasmobellumat3973 3 года назад +80

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

  • @mmseng2
    @mmseng2 4 года назад +364

    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 2 года назад +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 .

  • @AlexDanut
    @AlexDanut 4 года назад +470

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

    • @tbbw
      @tbbw 4 года назад +22

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

    • @emilio88regis
      @emilio88regis 4 года назад +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 года назад +1

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

  • @sabrinapyles563
    @sabrinapyles563 2 года назад +3

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

  • @ashish_jb4
    @ashish_jb4 Месяц назад

    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.

  • @viniciusvbf22
    @viniciusvbf22 4 года назад +102

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

  • @maylinare5782
    @maylinare5782 4 года назад +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!

  • @Dinnye01
    @Dinnye01 2 года назад +14

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

  • @luckyizzac
    @luckyizzac Год назад +4

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

  • @Zuudo
    @Zuudo 4 года назад +39

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

    • @Navigator87110
      @Navigator87110 4 года назад +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.

  • @neilolif
    @neilolif 4 года назад +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!!

  • @junkproduct
    @junkproduct 2 года назад +1

    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.

  • @TheMeldanor
    @TheMeldanor 2 года назад +34

    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!

  • @ozzymandius666
    @ozzymandius666 4 года назад +60

    Clear and concise explanation of what each component is doing, and breadboarding best practices demonstrated. This channel is a great public service.

  • @DC-ox4rc
    @DC-ox4rc 4 года назад +960

    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!

  • @StuartWoodwardJP
    @StuartWoodwardJP 2 года назад +10

    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.

  • @jameskelly2515
    @jameskelly2515 4 года назад +9

    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.

  • @nathanglevy
    @nathanglevy 4 года назад +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!

    • @DRSDavidSoft
      @DRSDavidSoft 4 года назад

      Can't agree with your points more!

    • @chriskaprys
      @chriskaprys 4 года назад

      ^^ ditto.

    • @tsaligm6320
      @tsaligm6320 4 года назад

      So this is not the real world? Do we all live in a lie?

    • @ornessarhithfaeron3576
      @ornessarhithfaeron3576 3 года назад

      @@tsaligm6320 Everything is a lie, nothing exists

  • @rafabulsing
    @rafabulsing 4 года назад +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 4 года назад +1

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

  • @vapourmile
    @vapourmile 4 года назад +221

    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

  • @dimiutube
    @dimiutube 3 года назад +3

    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!

  • @infinitenex8165
    @infinitenex8165 4 года назад +3042

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

    • @CZghost
      @CZghost 4 года назад +210

      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 4 года назад +44

      Shots fired 👌🏼

    • @michaelgalarneau5253
      @michaelgalarneau5253 4 года назад +56

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

    • @buckstarchaser2376
      @buckstarchaser2376 4 года назад +26

      Gives some new perspective to the EA Sports commercials.

    • @bravefastrabbit770
      @bravefastrabbit770 4 года назад +46

      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?

  • @evilotis01
    @evilotis01 4 года назад +20

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

  • @sevenhong5809
    @sevenhong5809 3 года назад +26

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

  • @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 4 года назад +9

    You're the professor we need at universities

  • @raptorekpl
    @raptorekpl 4 года назад +139

    “Some random value”... 42 :D

    • @joey199412
      @joey199412 4 года назад +7

      42 hex is 66 in decimal

    • @andysyme8507
      @andysyme8507 4 года назад +26

      @@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 4 года назад +11

      It's also 101010 in binary

    • @DrathVader
      @DrathVader 4 года назад +5

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

    • @philiparny3178
      @philiparny3178 4 года назад +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.

  • @vaio232
    @vaio232 4 года назад +4

    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 года назад

      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 !

  • @vitorenes
    @vitorenes 3 года назад +1

    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.

  • @fightocondria
    @fightocondria 4 года назад +349

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

    • @thyTwilightGoth2
      @thyTwilightGoth2 4 года назад +12

      Finally Found the EA Comment!

    • @slendeaway7730
      @slendeaway7730 4 года назад +2

      TreeLC

    • @michalnemecek3575
      @michalnemecek3575 4 года назад +14

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

    • @jarisipilainen3875
      @jarisipilainen3875 4 года назад

      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 4 года назад +13

      @@jarisipilainen3875 r/woosh

  • @vaendryl
    @vaendryl 4 года назад +83

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

    • @Mythricia1988
      @Mythricia1988 4 года назад +4

      Secretly he prototypes these circuits using combinators.

    • @jmullentech
      @jmullentech 4 года назад +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!

  • @dmsalomon
    @dmsalomon 4 года назад +212

    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 3 года назад +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 3 года назад +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

      ruclips.net/video/PE-_rJqvDhQ/видео.html

    • @SustainedFuture
      @SustainedFuture Год назад +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: ruclips.net/video/PE-_rJqvDhQ/видео.html

    • @mridulagrawal2370
      @mridulagrawal2370 Год назад

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

  • @KE0RM
    @KE0RM Год назад +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.

  • @mikhailanisimov2160
    @mikhailanisimov2160 4 года назад +1272

    Uses semicolons in python. This guy is savage!

    • @BenEater
      @BenEater  4 года назад +601

      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 4 года назад +194

      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 4 года назад +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 4 года назад +34

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

    • @brantwedel
      @brantwedel 4 года назад +124

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

  • @unbeirrbarde
    @unbeirrbarde 4 года назад +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.

  • @JurassicJenkins
    @JurassicJenkins 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!

  • @misterspike
    @misterspike 3 года назад +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!

  • @3vi1J
    @3vi1J 4 года назад +4

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

  • @JC50000000
    @JC50000000 4 года назад +740

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

    • @famitory
      @famitory 4 года назад +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 4 года назад +9

      what are these Christmas tree looking things named?

    • @ke4est
      @ke4est 4 года назад +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 4 года назад +3

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

    • @ke4est
      @ke4est 4 года назад +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. 😀

  • @nullFoo
    @nullFoo 2 года назад +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

  • @WintonMc
    @WintonMc 2 года назад +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 RUclips 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.

  • @danielfogli1760
    @danielfogli1760 4 года назад +13

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

  • @charlesbaldo
    @charlesbaldo 4 года назад +3

    I coded assembly and BASIC on 6502 for Apple and commodore. This was a blast from the past. Thank you

  • @andie_pants
    @andie_pants 3 года назад +6

    Can I just say as an armchair enthusiast-level viewer... you have made this so clearly understandable that even though I only took one semester of C++ ten years ago, I don't feel lost.

    • @andie_pants
      @andie_pants 3 года назад +1

      "It's just yelling into the void." Same, little microprocessor. Same.

  • @mrbigheart
    @mrbigheart 3 года назад +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!

  • @Nathan-wk9dd
    @Nathan-wk9dd 4 года назад +3

    I have a CS degree and i find they these videos pack more educational value into an hour than some classes I took packed into a semester.
    This is currently my favorite RUclips channel, you have a gift for breaking down complexity and articulating it in a very accessible way.

  • @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 Год назад +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 Год назад +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. 😀

  • @useless.production
    @useless.production Год назад +10

    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!

  • @The-python-guy
    @The-python-guy 10 месяцев назад +2

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

  • @gemazarusgaming1549
    @gemazarusgaming1549 2 года назад +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.

  • @lxathu
    @lxathu 4 года назад +8

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

  • @VincentGroenewold
    @VincentGroenewold 4 года назад

    I just found this channel and I'm binge watching like crazy. This is so amazingly clear and answers so many questions, you don't get that easily from a book or school for some reason. Thank you!

  • @guygrotke8059
    @guygrotke8059 Год назад +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.

  • @itwsntme
    @itwsntme 4 года назад +33

    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.

  • @daleowens7695
    @daleowens7695 2 года назад +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.

  • @endermannull4420
    @endermannull4420 2 года назад +1

    My eyes have been opened. This is a very interesting topic and I wish to continue learning about it.

    • @endermannull4420
      @endermannull4420 Месяц назад

      right who do you think you are
      get out of my hobbies

  • @rickybobby9885
    @rickybobby9885 4 года назад +2

    As someone who really understand this, I know how much time you must have put into these videos. Seriously thank you! So much fun to watch. I often get carried away with the higher level stuff so its fun to go back down to the roots

  • @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.

  • @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.

  • @astrobullivant5908
    @astrobullivant5908 3 года назад +1

    Honestly, this is one of the most underrated videos on RUclips.

  • @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.

  • @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.

  • @garydunken7934
    @garydunken7934 4 года назад +13

    I did not want to see this video to end. I could endlessly watch this kind of stuff... until wife throws things at me.

    • @Kornchipzzz
      @Kornchipzzz 4 года назад

      Fun fact. That feeling/phenomenon is called "finifugal".

  • @duncan8238
    @duncan8238 3 года назад +1

    Beautifully produced videos mate, no second is wasted - I love the way you refer to the data sheets and show how it's done, that is something that can be difficult for beginners!

  • @humaneBicycle
    @humaneBicycle Год назад

    this guy just connected electronics, microprocessors, discrete mathematics in one youtube video. excellent video.

  • @pial2461
    @pial2461 4 года назад +21

    Just waiting for this so long!:)

  • @mutated__donkey5840
    @mutated__donkey5840 4 года назад +101

    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 3 года назад +13

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

    • @qazxsw21000
      @qazxsw21000 3 года назад

      @@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 3 года назад +4

      @@qazxsw21000 sry but no

    • @user-jh6kx1fw9h
      @user-jh6kx1fw9h 3 года назад

      "Advance up from the deep" is Jam Baxter - Brains, "Deep aquatic excavator" @ruclips.net/video/P4l36YrHw2w/видео.html ;$

  • @Bermis482
    @Bermis482 2 месяца назад

    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!!!

  • @cac2244
    @cac2244 3 года назад

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

  • @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!

  • @TimothyChapman
    @TimothyChapman 4 года назад +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 4 года назад +6

      Hey, I was going to write this :)

    • @tiikoni8742
      @tiikoni8742 4 года назад +12

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

    • @cringium
      @cringium 4 года назад +3

      i dont get what this means

    • @brianmiller1077
      @brianmiller1077 4 года назад +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 4 года назад +3

      @@brianmiller1077 i now understand more but not fully.

  • @kellyhiggins5703
    @kellyhiggins5703 2 года назад

    DUDE!!! I CAN NOT thank you enough! I'm currently taking a class in this a part of my lower grad and your series has inspired me in so many ways. Between the first two weeks of class and a couple of your videos I feel like I understand the basic concepts of integrated circuits now! I'm proud of myself but you, sir, should be extremely proud of helping so many people understand this stuff. I can't wait for my kit to come in so I can start digging in!!

  • @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.

  • @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. :)

  • @TeknozFR
    @TeknozFR 3 года назад +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

  • @noir371
    @noir371 2 года назад +2

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

  • @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!!!

  • @lemonglataitor2123
    @lemonglataitor2123 4 года назад +5

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

  • @TomStorey96
    @TomStorey96 4 года назад +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.

    • @havresylt
      @havresylt 4 года назад

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

  • @KeithStarr696969
    @KeithStarr696969 3 года назад +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!

  • @ASOTFAN16
    @ASOTFAN16 2 года назад +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

  • @secular8887
    @secular8887 4 года назад +7

    And without even watching this I can say that this is THE MASTERPIECE....that any youtuber can make.....
    1)Ben eater
    2)3 Blue 1 Brown...
    are THE MOST AWESOME channels on YT.....

  • @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!

  • @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.

  • @TheMrRuttazzo
    @TheMrRuttazzo 4 года назад +60

    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...

  • @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!

  • @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.

  • @stocktonrails9279
    @stocktonrails9279 2 года назад

    I just watched the first 4min of your video, and I already love it. It takes me back to my college days when I worked with an intel 8080 trainer (in a briefcase) in a microprocessor class learning some of the basics you cover here. Fast forward quite a few years, I would eventually write a small device driver in 8085 assy language (later hand-converted to 8088 code) to use a light pen with my Zenith Z-100 computer. The entire program was in 8088 assy and it was modular in nature- with the main body of the program calling various subroutines as necessary to perform its job. Anyway, this is a great video- thanks for posting.

  • @noneofyourbusiness4133
    @noneofyourbusiness4133 2 года назад +3

    “I’m going to be coding ‘hello world’ from scratch with machine code!”
    *also uses python*
    **CONFUSED SCREAMING**