I Designed My Own 16-bit CPU

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 พ.ค. 2024
  • In this video, I decided to design my own CPU, an emulator for it, its own assembly language, and a compiled language.
    Source and Binaries:
    github.com/sam-astro/Astro8-C...
    Support:
    ● Patreon: / astrosam
    ● Ko-fi: ko-fi.com/astrosam
    ● Monero: 4AAjyAHKnYwCsgJp16v1YeeDPA1Z51QKUfCMWsiCDxkNBFCtbUfDHD7K5sZDrFH2pnGsDAH989XwXdudcoC4iqtVC9QLk8r
    --------------------------------------------------
    Related Links:
    ● Streaming Channel: / @astrosamstreams
    ● Itch.io: astrosam.itch.io/
    ● Github: github.com/sam-astro
    ● Discord Server: / discord
    --------------------------------------------------
    Music:
    Buy Mode 1 - The Sims
    Deference for Darkness - Halo 3 ODST
    The Rocket - Wintergatan
    Buy Mode 2 - The Sims
    Return Journey - Chris Doerksen
    --------------------------------------------------
    Chapters:
    0:00 Intro
    0:40 Breaking it down
    1:26 Start designing
    1:46 Instruction set
    6:03 Memory layout
    7:03 Video circuitry
    8:15 Writing programs
    9:03 A compiled language
    11:01 The emulator
    11:55 Compiled programs
    12:15 Making pong
    15:10 Outro
    --------------------------------------------------
    This video is not sponsored.
    #programming
    #coding
    #cpu
    #cpp
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 1.9K

  • @AstroSamDev
    @AstroSamDev  ปีที่แล้ว +560

    It sure has been a while since my last video, and there are so many new faces here!
    If you want to interact more with the community, I have a discord server where we talk about cool and random programming things, and you can see sneak peeks of future videos! discord.gg/9p82dTEdkN
    I will also start streaming programming soon on my second channel here: th-cam.com/channels/QSOig4wEV_pAFPRg0qtSmQ.html

    • @offsetmonkey5382
      @offsetmonkey5382 ปีที่แล้ว

      Hmmm 7 minutes beforr video was uploaded

    • @Gamer-ct6hb
      @Gamer-ct6hb ปีที่แล้ว +1

      @@offsetmonkey5382 sus

    • @kingofthegoats7032
      @kingofthegoats7032 ปีที่แล้ว

      Discord server is very good everyone should instantly join

    • @stickworldanimated9545
      @stickworldanimated9545 ปีที่แล้ว

      Very Nice

    • @ItsCOMMANDer_
      @ItsCOMMANDer_ ปีที่แล้ว

      Why don't you team up with @Sam Zeloof to meke a homemade computer, he made an 1000 transistor silicon based chip.

  • @le9038
    @le9038 ปีที่แล้ว +5474

    >>creates own programming language
    >> learn and creates a CPU with it's own assembly and microcodes
    this man is becoming god.

    • @imrobbinganyonewhotalkstom4881
      @imrobbinganyonewhotalkstom4881 ปีที่แล้ว +86

      Broo this is not 4chan

    • @imrobbinganyonewhotalkstom4881
      @imrobbinganyonewhotalkstom4881 ปีที่แล้ว +10

      @@le9038 just assumed it was

    • @maxelartist4264
      @maxelartist4264 ปีที่แล้ว +16

      and after create own digital world where is made computer those emulate metaverse

    • @catx6262
      @catx6262 ปีที่แล้ว +44

      @@le9038 ew... reddit

    • @KatzRool
      @KatzRool ปีที่แล้ว +4

      @@le9038 I think you'll find it's quite literally the opposite lmaoo

  • @maindepth8830
    @maindepth8830 ปีที่แล้ว +4028

    The fact he did all this in under 4 months is impressive

    • @dimi5862
      @dimi5862 ปีที่แล้ว +51

      I can do it in one

    • @maindepth8830
      @maindepth8830 ปีที่แล้ว +238

      @@dimi5862 go on show me, everything from scratch, from nothing. As of this comment the date is Saturday 23rd july 2022.
      You can work during live streams to make sure you didnt cheat

    • @AkariInsko
      @AkariInsko ปีที่แล้ว +160

      i can do it in one
      (millenium).

    • @brysonw7270
      @brysonw7270 ปีที่แล้ว +6

      @@maindepth8830 lol but true

    • @brysonw7270
      @brysonw7270 ปีที่แล้ว +8

      @@dimi5862 prove it

  • @ByWire-yk8eh
    @ByWire-yk8eh ปีที่แล้ว +1387

    I designed a 16-bit CPU (microprocessor) in 1977 that was used in a mainframe as the I/O processor. It had a unique instruction set (RISC). Lots of fun, and a lot of work.

    • @helloworld145
      @helloworld145 ปีที่แล้ว +79

      16 bit in 1977? That's insane

    • @OpenGL4ever
      @OpenGL4ever ปีที่แล้ว +143

      @@helloworld145 Not for a mainframe. But the price tag sure was insane.

    • @CaptianTitan
      @CaptianTitan 10 หลายเดือนก่อน +12

      Cool

    • @herrbonk3635
      @herrbonk3635 10 หลายเดือนก่อน +55

      @@helloworld145 There were 64-bit computers in the early 1960s.

    • @KuroParasite
      @KuroParasite 9 หลายเดือนก่อน +22

      @@herrbonk3635 64 bit computers must be crazy expensive in that year lol.

  • @davidm7333
    @davidm7333 ปีที่แล้ว +1252

    As a programmer there's nothing that makes you feel quite like a fraud than seeing someone create their own CPU, build an emulator for it, create a programming language and compiler then write a game in it 😅
    Well done and keep up the good work!

    • @AstroSamDev
      @AstroSamDev  ปีที่แล้ว +218

      Thank you!
      Also, think the biggest problem with this project is time. I believe anyone can do it, easily, given there are so many resources online. But finding time to do the research, and make the design can be difficult. I didn't know anything about computer hardware, but I did research (and watched a lot of Ben Eater), and then a month later I made this cpu. It is relatively basic, but it is a start.

    • @seannibecker5500
      @seannibecker5500 8 หลายเดือนก่อน +8

      Wow, are you just super smart or something @@AstroSamDev

    • @Thiquid
      @Thiquid 7 หลายเดือนก่อน +12

      ​@AstroSamDev Even still, it takes incredible dedication to complete. Even if there's enjoyment to it, what you've done is beyond impressive!

    • @monad_tcp
      @monad_tcp 6 หลายเดือนก่อน +1

      Do you use programming language that were not made for Browsers ? (aka, not JS)
      If you answer yes to that, you're not a fraud.

    • @okie9025
      @okie9025 4 หลายเดือนก่อน +7

      ​@@monad_tcpyou wouldn't be able to write this comment without JS

  • @Azeal
    @Azeal ปีที่แล้ว +1709

    You have a level of knowledge about low-level computing that I wish I had in, well... anything. Incredible work, continue to hone your talents and I'm looking forward to that build when the day arrives!

    • @alperkaya8919
      @alperkaya8919 ปีที่แล้ว +22

      Just read textbooks

    • @elakstein
      @elakstein ปีที่แล้ว +12

      These things are taught in engineering.

    • @greatbullet7372
      @greatbullet7372 ปีที่แล้ว +28

      @@elakstein no they dont!

    • @elakstein
      @elakstein ปีที่แล้ว +5

      @@greatbullet7372 ok. I will correct myself. I learnt these things in college. Obviously not as deep as he showed in this video.

    • @vishnuskandata2355
      @vishnuskandata2355 ปีที่แล้ว +3

      @@elakstein true... but we somehow dont understand or learn that but a person like this can teach it in just hours...

  • @theburntcrumpet8371
    @theburntcrumpet8371 ปีที่แล้ว +912

    I've been programming for 8 years. I have recently fallen out of love with it. You have reminded me why I loved it in the first place - the ingenuity of simple yet expansible design, the thrill of problem solving and the marriage of hardware and software. Thank you.

    • @memeology4138
      @memeology4138 ปีที่แล้ว +1

      Hello can u help me? Im new to coding can u link me to any good sources for learning python

    • @elakstein
      @elakstein ปีที่แล้ว +36

      @@memeology4138 learn c first. Python abstract just too much. First language should be c if you want to understand things. I would recommend "Let us c" for leaning c. We used this to learn c in college, then I learnt Java fir understanding object oriented language, then python.

    • @abcdefghjijklfgu
      @abcdefghjijklfgu ปีที่แล้ว +2

      @@memeology4138 im new too but im doing c and js

    • @memeology4138
      @memeology4138 ปีที่แล้ว +2

      @@elakstein thx for ur help

    • @tacorito1809
      @tacorito1809 ปีที่แล้ว +6

      @@abcdefghjijklfgu why c and js? learn one language first, master it. plus, js is usually nothing without html/css, unless you're learning react and stuff.

  • @timedmondson1307
    @timedmondson1307 ปีที่แล้ว +151

    I have been involved in computer engineering since the 90's and to see how easy the knowledge is accessible now is mind blowing. I had to spend years on what he has done in a few months. This is truly the best time to be alive

    • @handlehaggler
      @handlehaggler 5 หลายเดือนก่อน +9

      I can't imagine what it must be like for the people who were there from around the beginning of all this craze to where we are now. At some point I imagine you knew everything there was to know about but as time moved on new products, programs and such became available and after a while it just becomes too much to all learn and you just watch in awe at how dense and complex its become

    • @MarkieMark-vy7hg
      @MarkieMark-vy7hg 2 หลายเดือนก่อน +1

      @@handlehagglerthe lady who help invent voip is still alive…she was one of the hallmark individuals in the creation of the World Wide Web. It’s so wild to me.

  • @Roter_Wolf
    @Roter_Wolf ปีที่แล้ว +123

    When I was 16 i just started learning my first programming language. Meanwhile this guy is casually creating his own languages and also designing a computer from scratch while he's at it.
    You're going places, man

  • @D.a.n_D
    @D.a.n_D ปีที่แล้ว +227

    So i just barely passed my computer architecture course. We did mostly 32 bit MIPS processor and we also had to design one ourselves, but on 16 bits, and we didn't have to add multiplication or division. We only implemented about 15 instructions and i can tell you what this man did right hear, is no easy work. You deserve way more subscribers for the amount of work you put in man. Great work!

  • @Auxilor
    @Auxilor ปีที่แล้ว +582

    Amazing. Deserves far more views! Would be great to see you make this CPU for real like the jdh-8

    • @AstroSamDev
      @AstroSamDev  ปีที่แล้ว +125

      I was planning on doing just that, it might just take some time though. I also want to do a design that doesn't use breadboards, and instead have a few custom PCBs printed.

    • @AstroSamDev
      @AstroSamDev  ปีที่แล้ว +58

      @@avinadadmendez4019 Cool, I have never heard of that program, I'll look into it more. Thanks!

    • @pixobit5882
      @pixobit5882 ปีที่แล้ว +14

      @@AstroSamDev I would buy it if it's not too expensive! I really like this project and i think it would be really fun to develop own programms that run on real hardware!

    • @cemalettincembelentepe8943
      @cemalettincembelentepe8943 ปีที่แล้ว +20

      @@AstroSamDev @AstroSam You can also put your design on an FPGA, I don't think I have ever seen one done on youtube before for a homebrew cpu. For those who don't know; FPGAs are circuits that you can load any digital circuit on it. For example you can put your circuit on an FPGA and map the input output pins of the top module and the circuit is now the circuit you created.

    • @xanderkyron
      @xanderkyron ปีที่แล้ว +7

      @@cemalettincembelentepe8943 FPGAs have been used for soft CPUs for a very long time now (well over a decade), it would be more interesting to see a hard CPU manufacturing approach and it would be unique for these homebrew CPUs unlike using an FPGA. Granted he'd be stuck getting them as samples on a really old process node (>=28nm), but that's more than good enough for this purpose

  • @asyncawait5335
    @asyncawait5335 ปีที่แล้ว +7

    Congrats on everything man I'm glad to see the progress you are making !

  • @nichonaugle5659
    @nichonaugle5659 ปีที่แล้ว +5

    incredible!! this is the most complex thing I've ever picked up on so quickly, You literally made this sound so straightforward I love it. Thank you so much!!!

  • @nathanaeltrimm2720
    @nathanaeltrimm2720 ปีที่แล้ว +395

    Man, the sequel to templeOS is looking wild, I’m just waiting for the twist the writers have planned.

    • @BigOrse
      @BigOrse ปีที่แล้ว +100

      It's just TempleOS minus the schizophrenia

    • @HBP27
      @HBP27 ปีที่แล้ว +35

      @@BigOrse so its just boring then

    • @BigOrse
      @BigOrse ปีที่แล้ว +11

      @@test-zg4hv What so I should praise the man for being completely insane?

    • @tsclly2377
      @tsclly2377 ปีที่แล้ว +3

      @@BigOrse I'll wait on that diagnosis..

    • @BigOrse
      @BigOrse ปีที่แล้ว +12

      Not coming here to defend myself, I don't care if what I said was stupid. To anyone saying I'm disrespectful though I suggest you maybe actually look into Terry Davis as a person, because he was a lot more disrespectful than I am.
      Anyway RIP Terry. I may not agree with his ideology but can't deny the man was a pretty legendary programmer.

  • @polic72andDrD3ath
    @polic72andDrD3ath ปีที่แล้ว +92

    It's been a while since I've taken a comp org class; this was the perfect bridge of software and hardware that reminded me why I loved it so much!

  • @amardevsharma1223
    @amardevsharma1223 ปีที่แล้ว +2

    Yo this helped so much and I always appreciate the content and when i found the channel and got the energy from you from the previous video, you've been nothing but real and can vouch for the amazing content and how down to earth you are with everything! All the most love, respect, and appreciation

  • @3v068
    @3v068 ปีที่แล้ว +2

    The first video of yours im watching and I love it! Ive always been interested in computers and specifically how they work, and ive also wanted to get into circuit building so this is RIGHT up my alley. Your editing is fucking amazing too! Keep it up dude!

  • @lewisd56
    @lewisd56 ปีที่แล้ว +293

    I did something similar to this a good few years ago, I designed an 8-bit CPU in logicSim, wrote an emulator in C#, designed an assembly language and assembler. Unfortunately, I made a lot of mistakes in designing the architecture, things like fixed instruction lengths and no way to store perform operations on values larger than 8 bits (technically it was possible, but with 256 bytes of memory and 8 of them reserved for registers it wasnt very useful anyway). Having recently written a Z80 simulator, and learning a lot about CPU architecture in the process helped me identify all of the issues in my initial design. with that said, it wasnt bad for an A-level project that confused the hell out of everyone who tried to mark it.

    • @absalomdraconis
      @absalomdraconis ปีที่แล้ว +3

      256 addresses and some external logic should be enough to implement a microcode architecture.

    • @TechTino
      @TechTino ปีที่แล้ว +13

      A-level??? Dude that's unreal. I built an sql table viewer in VB...

    • @shinyhappyrem8728
      @shinyhappyrem8728 ปีที่แล้ว +4

      Fixed instruction length isn't that bad, it's what RISC uses.

    • @lewisd56
      @lewisd56 ปีที่แล้ว +2

      @@shinyhappyrem8728 considering the memory limitations, every instruction being 3 bytes long is an issue (command operand1 operand2), some instructions didn't need operands, such as halt, but would still need 3 bytes in RAM.

    • @lewisd56
      @lewisd56 ปีที่แล้ว +4

      @Ramtin Javanmardi If you understand how the architecture works, writing an emulator isnt really too hard, you could even write a simulator if you wanted, but you need to get instruction timings and all sorts of hardware stuff simulated too, which can be a hassle.
      Basically, you need really 2 core things for an emulator, an ISA, which you should have if you designed the microArch, and some way to interpret the ISA, really this will probably be high level logic in your chosen programming language.
      I simply used a case switch on binary opcodes that called methods with the operands (remember, because this is an emulator, memory read and write timings dont matter), but a better approach (and the one I used on my Z80 simulator) would be to use instruction classes and loop through an array of these classes (well, cast to interfaces) testing if the opcode can execute a given function in the class.
      How you handle IO is up to you, I didn't, but memory mapped IO is pretty easy to implement and can be done by simply accessing the RAM object of your emulator.
      My Z80 simulator is open source, and was written for a university project, so it might help, it can be found here: github.com/Lewinator56/z80Sim (you will need .net core 3.1)
      Writing an assembler is kind of different, in reality at the easiest level you are simply going to have a defined assembly language and just convert it into opcodes, which is pretty easy to do. If you want to include functions and variables (by name) in the ASM then you need to process symbols too. I simply stuck with a conversion from ASM to binary.

  • @dubtokermusic950
    @dubtokermusic950 ปีที่แล้ว

    Awesomeness!! Always wondered how this works, very well laid out explanation dood

  • @snowflakezzonPC
    @snowflakezzonPC ปีที่แล้ว +4

    I really feel like it's understated how incredible this video really is. Amazing work, man!

  • @markify8019
    @markify8019 ปีที่แล้ว +7

    Your videos are extremely well edited and your explanations are in depth and easy to understand. Can’t wait to see you hit 100k soon!

  • @UNIT398
    @UNIT398 ปีที่แล้ว +23

    Simply amazing. The fact that you did all this for fun (mostly) speaks to your intelligence and understanding of how technology works. Yes, my brain didn't understand most of it, but seeing you construct each layer, part, and program was fascinating! I hope to see that creation of the CPU and other parts!

    • @JesusisJesus
      @JesusisJesus 9 หลายเดือนก่อน +2

      I understood about 0000000000000000% of it.
      Wondering WHY he did it, When there’s stuff already available and cheap these days, I guess it boils down to “Because I can”

  • @rezqy_
    @rezqy_ ปีที่แล้ว +6

    "I built my own earth"

    • @SusDoctor
      @SusDoctor 15 วันที่ผ่านมา +1

      I built the entire observable universe by scratch with real breathing life forms in it.

    • @Anirudhfou4
      @Anirudhfou4 6 วันที่ผ่านมา

      👍

  • @daviddafitt
    @daviddafitt ปีที่แล้ว +2

    This is amazing. I've always wanted to try things like this but I'm just a busy CS student for now. I'll come back to this if I do get time to start.

  • @comandercrypto1318
    @comandercrypto1318 ปีที่แล้ว +176

    You could learn verilog or vhdl to create the cpu on an fpga, then use off the shelf ic's for ram and rom. Fpga's, if you dont know, are programmable hardware that rewire themselves based on coding. Intel , AMD, and other companies use multi million dollar chips for prototyping chips before sending them off to print. Consumer models range from $50 to $300, and have been used for software implementations for retro systems and modern 32 and 64 bit risc v based cpus.

    • @proxy1035
      @proxy1035 ปีที่แล้ว +13

      alternatively you can also be lazy like me and simply build your circuits in a logic simulator like "Digital" (it's like Logisim but faster and with extra features) and then just export them as Verilog/VDHL.
      it works surprisingly well actually.

    • @hedgehuug1603
      @hedgehuug1603 ปีที่แล้ว

      yes this

    • @ArneChristianRosenfeldt
      @ArneChristianRosenfeldt ปีที่แล้ว +3

      And at this point I would have thought that chips from Intel and AMD are pure evolution .. no revolutionary steps. Steps are not agile. Maybe they include experimental modules in every chip, test them, and if it works, you get the next iteration ( more expensive ). An FPGA and a chip from Intel have nothing in common. Intel chips are optimized down to the photolithography layout and full analog simulation (spice) of the transistors. FPGA does not give you this. The days of the Pentium DIV bug, where a professor from a university uses an ad hoc script to get his algorithm from university software to some proprietary CAD at intel, are long gone.

    • @OpenGL4ever
      @OpenGL4ever ปีที่แล้ว

      @@ArneChristianRosenfeldt The advantage of using an FGPA instead of individual chips for this project is, that others could make use of it too by simply reprogramming their FPGA. There is already a real CPU design called Magic-1 from Bill Buzbee. The problem is, others have to recreate it, if they want have a copy of it. Search for Magic-1 on YT, there are some videos about this impressive project.

    • @darkcoeficient
      @darkcoeficient 6 หลายเดือนก่อน

      ​@@ArneChristianRosenfeldtwouldn't FPGA be a bit more like a drawing board at that level?

  • @martinooliveri7310
    @martinooliveri7310 ปีที่แล้ว +66

    amazing, and actually insipiring. im looking forward to make my own operative system in the future and these videos bring me so much joy. cheers!

    • @WTBuilder
      @WTBuilder ปีที่แล้ว

      is it linux based?

    • @4.0.4
      @4.0.4 ปีที่แล้ว +1

      @@WTBuilder _"Interjection!!"_
      - Stallman Ace Attorney

  • @evandossett3897
    @evandossett3897 หลายเดือนก่อน

    Love the video and the content! Only issue I had was getting caught off guard by the change in music or the selection, startled me a few times cause it would change out of no where while I wasn't fully focused on it and thought something was making noise in a different tab or process lol.

  • @gegaomega5038
    @gegaomega5038 ปีที่แล้ว +303

    i am too stupid to understand it

    • @Schnickenpick
      @Schnickenpick หลายเดือนก่อน +18

      Finally something I can relate to

    • @0x_nietoh
      @0x_nietoh หลายเดือนก่อน +2

      At least you’re not in denial. Less competition for us folks!

    • @filipec0rreia
      @filipec0rreia หลายเดือนก่อน +3

      ​@@0x_nietoh "folks"

    • @kiwi7556
      @kiwi7556 หลายเดือนก่อน

      Womp womp

    • @aleclandman8194
      @aleclandman8194 หลายเดือนก่อน +8

      Noooo. You just haven't gone deep enough to understand. Not understanding YET is totally different from being stupid.
      :)

  • @lucarosania1358
    @lucarosania1358 ปีที่แล้ว +12

    This is probably the most impressive thing I've ever seen on TH-cam, very very good job! Thank you so much for sharing this 😊

  • @plk173
    @plk173 ปีที่แล้ว +3

    when the video was suggested I was like ooo intersteing, then you introduced it and i was like oh no another meme project but instead you made an extremely difficult topic accessible and interesting, cant wait to see more from you

  • @morchedlafferty8614
    @morchedlafferty8614 6 หลายเดือนก่อน

    Impressed!!! Great content! Well presented, I loved it!

  • @robmartin7873
    @robmartin7873 ปีที่แล้ว

    Great work! Thank you for documenting this for us

  • @GodofWar1515
    @GodofWar1515 ปีที่แล้ว +3

    Really awesome work! I've been really interested in this for a very long time. Really glad to see more people getting into this as well.
    Keep up the great work!

  • @M3LP
    @M3LP ปีที่แล้ว +7

    This is both beautiful and confusing, it's truly art. I wish go truly understand everything here, but this flies way over my head.

  • @thomasvogel4340
    @thomasvogel4340 ปีที่แล้ว

    I've always wanted to know how computers work at lower levels. Thanks a lot, this was very insightful, and was very entertaining to watch. You got a new subscriber now.

  • @pan2285
    @pan2285 10 หลายเดือนก่อน

    Thanks brother, your content helps me a lot! Keep up the great work! This is exactly what yt is made for!!

  • @monemperor1559
    @monemperor1559 ปีที่แล้ว +66

    this is insane. Making a CPU, then your own compiler specifically to run programs on it and then an emulator for it.
    Cool stuff

  • @adama7752
    @adama7752 ปีที่แล้ว +61

    Man relives computer history. Punch cards, assembly, etc..

  • @FloatSamplesGT710
    @FloatSamplesGT710 20 วันที่ผ่านมา +1

    You deserve way more subs dude, very underrated and hardworking/smart working and dedicated too

  • @ArtemArist
    @ArtemArist 10 หลายเดือนก่อน

    What the hell, man, this is nuts..
    Great work, i cannot imagine how tough it was to this point, damn..

  • @ggre55
    @ggre55 ปีที่แล้ว +6

    Damn bro
    I can't believe how smart u actually are i never thought someone like u would exist really really awesome
    Damn

  • @leeaffdraws8502
    @leeaffdraws8502 ปีที่แล้ว +6

    Woah, I remember last year, one of the subjects I had during the semester was about computer architecture. We saw how the alu works, the ram, the control unit, instruction and microinstruction sets and even periferal handling. Our tests were about designing some use cases for each component, which was a demanding process. Seeing you put that knowledge to work makes me remember how amazed I was while taking those classes. Nice video! and excellently explained too

    • @mathismartin3092
      @mathismartin3092 ปีที่แล้ว +1

      I did that last year too! I don't know what software you used, but here we did it with diglog and it was a lot of fun ^^

    • @leeaffdraws8502
      @leeaffdraws8502 ปีที่แล้ว

      @@mathismartin3092 Our exams were mainly done on paper, but we used logisim for practicing! Of course we stuck to no more than 4 or 5 bits for the instruction set, and mostly doing just read, write and math instructions, but it was really interesting to figure out how to do certain things :D

  • @raychrash5139
    @raychrash5139 ปีที่แล้ว +2

    dude legit its my first year in computer science university and the fact that i understood everything you said in this video makes me happy, you inspired me to try messing around with cpu designing

  • @Azurdos
    @Azurdos ปีที่แล้ว

    My godness, your content is awesome !
    I think that a video explaining your path to achieve such a detailed knowledge about low level computing would also be very interesting :)

  • @ad.i
    @ad.i ปีที่แล้ว +4

    THIS WAS EXPLAINED SO WELL WHAT THE HELL? SERIOUSLY KUDOS TO YOU MAN

  • @estebanod
    @estebanod ปีที่แล้ว +7

    This guy is building his whole DIY computer and I struggle to write a three-line-long Python code to download pictures from a website ...

    • @eekee6034
      @eekee6034 ปีที่แล้ว

      Yeah. I've wanted to build my own computer for decades, but my brain just goes, "what are these facts NOPE!" lol but it's getting better slowly.

  • @jimenezharlenjoyf.8158
    @jimenezharlenjoyf.8158 ปีที่แล้ว

    You are literally the best, I've been looking for a tutorial for three days and yours works

  • @suvetar
    @suvetar 2 หลายเดือนก่อน

    Thanks for this! Very inspirational and please keep up the good work!

  • @Koljon
    @Koljon ปีที่แล้ว +4

    very cool cant wait to see you building it in irl ;)

  • @kingofthegoats7032
    @kingofthegoats7032 ปีที่แล้ว +28

    What's next? Own OS on this CPU programmed with z#? Lol
    Great vid btw worth the wait

    • @AstroSamDev
      @AstroSamDev  ปีที่แล้ว +14

      Probably, that text editor is just begging to be transformed into an interactive command line.

    • @kingofthegoats7032
      @kingofthegoats7032 ปีที่แล้ว +7

      @@AstroSamDev AstroOS coming :000

    • @haralabospap7091
      @haralabospap7091 ปีที่แล้ว +3

      @@AstroSamDev rewrite the Linux kernel in Z# and make z#/Linux
      /s of course

    • @Maykeye
      @Maykeye ปีที่แล้ว +1

      Lol aside, that's actually not impossible: see Collapse OS for how to bootstrap from almost nothing to working OS.

  • @zencibalina2926
    @zencibalina2926 ปีที่แล้ว

    Thanks for the motivation. I wasn't sure if I could do it, but I might try it eventually.

  • @Gghhhngbvg
    @Gghhhngbvg ปีที่แล้ว

    I just found your channel today and your crazy dude! im Just getting into computers. But Making a language AND creating a whole new CPU. Is amazing man! If your were to ask a professor how to do this, he would look at like you were insane! Keep up the great work man!!

  • @totallynotabot151
    @totallynotabot151 ปีที่แล้ว +34

    Now grab an FPGA devkit and turn it into real hardware! (In case you haven't done that before, designing circuitry with Verilog / VHDL is actually quite an interesting puzzle).

    • @AxelMontini
      @AxelMontini ปีที่แล้ว +7

      Agree. My university had us build a single cycle 8-bit MIPS processor on a Xilinx FPGA. A very simple processor, yet probably the best project we've done so far.

  • @atomspalter2090
    @atomspalter2090 ปีที่แล้ว +4

    congrats for that achievement. You actually designed a own computer. Wow!

  • @Random-os5rd
    @Random-os5rd ปีที่แล้ว +1

    Great tutorial, links and program worked fine for me. Thanks for sharing.

  • @tomasdougan1419
    @tomasdougan1419 ปีที่แล้ว

    holy shit I'm shocked how cool your channel is. Awesome video!

  • @nullmemaddress
    @nullmemaddress ปีที่แล้ว +45

    Let’s get this strait:
    - Man makes own cpu
    - Man then makes own language
    - Man then makes own compiler
    - Man then makes his own emulator
    WTF

    • @msmith2961
      @msmith2961 ปีที่แล้ว +4

      Don't forget he also wrote a port of Pong to run on said computer...

    • @notsa_s
      @notsa_s ปีที่แล้ว +2

      Bro this is like jdh shit right here

    • @DumDoger
      @DumDoger ปีที่แล้ว

      *straight

    • @PiyushBhakat
      @PiyushBhakat ปีที่แล้ว +1

      And he's ONLY 16. When I was 16, I was barely writing hello world in C++.

    • @alexyo2440
      @alexyo2440 10 หลายเดือนก่อน +1

      ​@@PiyushBhakatBits per age. This man will only grow stronger in time and consume more bits

  • @Hylianmonkeys
    @Hylianmonkeys ปีที่แล้ว +4

    HELL YEAH.
    I unknowingly taught myself how to build computers using redstone in minecraft.
    At this point I've now built dozens of redstone machines including an entire gamesystem in minecraft. It has a 7x7 pixel screen, A 7bit CPU, more than 80 4bit regesters, and a rom size currently only 5.456KB or 496 bytes. However the rom can be expanded to indefinite sizes.

  • @stephencarter2041
    @stephencarter2041 ปีที่แล้ว

    very interesting. love your explanation on everything.

  • @neilclay5835
    @neilclay5835 7 หลายเดือนก่อน

    Excellent work, nice video presentation as well

  • @fillupdidier5514
    @fillupdidier5514 ปีที่แล้ว +28

    The quality of your videos is like a youtuber with a million views per video. I guess I found your channel the right time as I am getting more into computers but not even close to where you're at.

  • @Bobbias
    @Bobbias ปีที่แล้ว +54

    For smoother movement of the paddles, you could have created 2 more characters (either added to the charset, or overwriting some unused characters) with half height paddle characters, so your paddle could move in half-tile increments.

    • @Maykeye
      @Maykeye ปีที่แล้ว +4

      if it supports color for text, 1 character is enough: you simply swap background and foreground color which turn ▀ turns into ▄ .

    • @morgan0
      @morgan0 ปีที่แล้ว +1

      or a way to write arbitrary data into unused characters and then display that with the faster character rendering

    • @OpenGL4ever
      @OpenGL4ever ปีที่แล้ว

      This would make the drawing routine more complex and thus slower. Better design a bit blitter and let the bit blitter hardware do the rest.

  • @tekkiech3485
    @tekkiech3485 ปีที่แล้ว

    This video really helped me. Thank you very much!

  • @ingenierocantor
    @ingenierocantor ปีที่แล้ว

    What the Awessome Project! And very good music.

  • @CYON4D
    @CYON4D ปีที่แล้ว +8

    Does your emulator skip the logic layer and just execute instructions on the list?
    You did an amazing job with your custom CPU.
    By the way I noticed the original Sims OST playing in the background. I love that OST.

  • @jeffparent2159
    @jeffparent2159 ปีที่แล้ว +7

    Very cool project. This was the stuff I loved doing at uni. Sadly FPGA are still crazy expensive, the CPUs we designed there were all in HDL languages and allowed you to run on hardware. Makes me wanna dig out that code again.

  • @MotownBatman
    @MotownBatman ปีที่แล้ว

    This is Crazy Hangover type Witchraft!
    Epic Project; Great Job!

  • @codeplayer8575
    @codeplayer8575 ปีที่แล้ว +1

    My friend, you are truly a legend. Congrats!

  • @joshuadelawarr1027
    @joshuadelawarr1027 ปีที่แล้ว +3

    AstroSam in 10 years: imade my own os that simulates our universe

  • @hamburgerhamburgerv2
    @hamburgerhamburgerv2 ปีที่แล้ว +4

    2025: I designed the world’s most powerful computer

  • @Gailon1000
    @Gailon1000 ปีที่แล้ว

    TH-cam needs more content like this!!! Thank you for dedication and educating us

  • @alexjohnson5677
    @alexjohnson5677 10 หลายเดือนก่อน

    I had a similar project during my computer science degree. This was a good refresher on the different individual components of a CPU. Makes me want to fire up Logisim again! Great video.

  • @AshtonSnapp
    @AshtonSnapp ปีที่แล้ว +40

    Using a 16-bit address bus would get you 64 kibibytes. Although, since you’re storing a 16-bit word at each address rather than a byte, you have 64 kibiwords - or 128 kibibytes - of memory to work with.
    Le edit: 1 kibibyte = 1024 bytes. 1 kilobyte = 1000 bytes. One is a binary prefix, the other is a metric prefix.

    • @axmoylotl
      @axmoylotl ปีที่แล้ว +16

      how many habibibytes is that

    • @DeeezNuts
      @DeeezNuts ปีที่แล้ว +8

      @@axmoylotl 2 hamoodibytes

    • @anon_y_mousse
      @anon_y_mousse ปีที่แล้ว

      I'm never going to use that childish sounding garbage. 1024 bytes is a kilobyte and SI has no business even being included in the discussion, I don't even care that they're using the same letters for prefixing, it's still going to be powers of two. Hard drive manufacturers have caused and are continuing to cause harm to the industry by being such cheats and now we've got douche-nozzles who want to redefine all of our terms instead of taking the manufacturers to task. It's almost as bad as changing BC/AD to BCE/CE because they don't like the implications of how the names originated. Stop redefining terms.

    • @tissuepaper9962
      @tissuepaper9962 ปีที่แล้ว +8

      Nobody cares about kibi, kilobyte is 1024 in my heart.

    • @Anon.G
      @Anon.G ปีที่แล้ว +2

      @@tissuepaper9962 same here

  • @janikarkkainen3904
    @janikarkkainen3904 ปีที่แล้ว +4

    Awesome project. I love stuff like this, even started my own project. Tho it's already a few years working on and off on it, and using a 6502 instead of just logic stuff, and on breadboards. Fun stuff and great work getting so deep with this stuff!
    Now make it in real hardware! 😏 ...I mean, you used logisim so IC counterparts should be relarively easy to come by, VGA might pose some problems but the VGA signal is quite simple in the end...

  • @jayanthpandit3437
    @jayanthpandit3437 4 หลายเดือนก่อน +1

    watched this video once before college and didn't understand much. watched it again after my first semester as an ECE major and understood a lot more. thanks!

  • @trupalpatel2329
    @trupalpatel2329 ปีที่แล้ว

    thank you soo much very direct link n works for me love the way you expressed the installation .

  • @Frankabyte
    @Frankabyte ปีที่แล้ว +17

    This is seriously impressive, and I'm blown away by the amount of time and effort that went into this...
    ...but can it run DOOM?

  • @gawkersdeathrattle1759
    @gawkersdeathrattle1759 ปีที่แล้ว +9

    You may want to expand the architecture to add interrupts, although it does complicate things somewhat given that you'll probably want a stack to handle those, and you currently don't have anything stack-ish like jump-to-subroute or returns.

    • @Ehal256
      @Ehal256 ปีที่แล้ว

      Was going to mention this. It would make timing quite a bit simpler, no more arbitrary wait N cycle loops, just execute game logic once on every vertical sync interrupt. :)

  • @mafin_official
    @mafin_official ปีที่แล้ว +1

    you sir are very entertaining and smart. you made this video better than most youtubers i know. you actually put effort into these videos. you deserve my sub.

  • @rey4860
    @rey4860 ปีที่แล้ว

    Your actually the goat, This helped so much thank you.

  • @gachastorys5129
    @gachastorys5129 ปีที่แล้ว +12

    Hey so I have an idea! I think that Z# would fit perfectly as an embed for the computer. It should be its own name language. Kind of like batch is for windows. I’m very impressed by this! Hope to see more videos from you in the future

  • @Bobbias
    @Bobbias ปีที่แล้ว +7

    One small thing about how you explained your emulator. You conveniently forgot to mention that part of why logisim is so much slower is that it actually simulates things far more in depth than your emulator. A very minor thing, but the way you glossed over it gives the impression that logisim is slow because... It's slow. Rather than because it's doing way more work than your emulator.

    • @DFX2KX
      @DFX2KX ปีที่แล้ว +1

      and Logisim's speed does depend on whether or not one is using the default 'chips' inside it or not, it has math operators and register modules, and whatnot, but if you eschew that and go down to the individual gates in sub-circuits....

    • @Ehal256
      @Ehal256 ปีที่แล้ว +1

      He does say that logisim is simulating every logic gate, and that's why it's slow. Seemed sufficient to me.

    • @Costelad
      @Costelad ปีที่แล้ว

      Yeah I was a bit confused at that. Why would they differ in speed so much when they’re both emulators?

    • @Ehal256
      @Ehal256 ปีที่แล้ว +1

      @@Costelad Imagine instead of executing an add instruction directly, you simulate the propagation of electricity through each part of the circuit implementing an add operation.

  • @anasmhiri
    @anasmhiri ปีที่แล้ว

    Bro this is amazing!!
    Keep going

  • @omegablade89
    @omegablade89 ปีที่แล้ว +3

    Great video, I don’t know how old you are, but it’s clear you know your stuff. I hope Intel or Amd contacts you for a job.

    • @JtagSheep
      @JtagSheep ปีที่แล้ว +1

      Intel x86 is a little more complex than making a 16 bit cpu.

  • @7.12_am
    @7.12_am ปีที่แล้ว +8

    Bet in 2030 he'll be competition for Intel, AMD and NVIDIA after he figures out how to chemically make transistors

    • @LuaanTi
      @LuaanTi ปีที่แล้ว

      You want Sam Zeloof for that :P th-cam.com/video/s1MCi7FliVY/w-d-xo.html

  • @kakes_
    @kakes_ ปีที่แล้ว +2

    Literally finishing up my build of Ben Eater's 8-bit breadboard computer as I write this. I'm already itching for 16 bits, among many other improvements. (Thinking I might slap a Pi Pico on there so I can control it from a web interface - could be interesting.)
    Looks like a fun project! I'll definitely be following your progress with this. I admire that you're designing it yourself from the ground up, something I kind of wish I'd done myself tbh, haha.
    (Also, love the Wintergatan!)

  • @hikaroto2791
    @hikaroto2791 ปีที่แล้ว

    Dopest video ever, period. My respect sir! Hope one day i can do something as you did!

  • @The_hot_blue_fire_guy
    @The_hot_blue_fire_guy ปีที่แล้ว +4

    Now you need to build this with actual hardware and add a long term memory to it. Like a SD card slot or something that could be used to store data even when the system is turned off.

  • @therealyojames
    @therealyojames ปีที่แล้ว +3

    Hmmmm jdh.

  • @carl3836
    @carl3836 ปีที่แล้ว

    Thank you soo much! This helped a lot! ❤️

  • @LegendOfKarogane
    @LegendOfKarogane 4 หลายเดือนก่อน

    Bruh THIS IS AMAZINGLY HELPFUL THANKS 🙏🏿

  • @ana303_
    @ana303_ ปีที่แล้ว

    I had microprocessor last semester, you did well explaining everything as simply as possible.

  • @PhilipLozano_0
    @PhilipLozano_0 ปีที่แล้ว

    Loved the vid. Wintergatan music was a nice touch :)

  • @jigneshsolanki2486
    @jigneshsolanki2486 ปีที่แล้ว

    Been watcNice tutorialng your vids for a good few weeks now, learning new sNice tutorialt each day. my worksoftow has improved so much since watcNice tutorialng

  • @neomage2021
    @neomage2021 ปีที่แล้ว

    Fun project! I remember having to do this (but 8 bit) in digital electronics class in undergrad for EE.

  • @mixmaster5150
    @mixmaster5150 ปีที่แล้ว +2

    I love that you're using the gameboy sims musics for this video. I mean those are incredibly underrated games but made my childhood

  • @Chrls5
    @Chrls5 ปีที่แล้ว

    oh My God this project is superb, beautiful, great job ❤️

  • @georgiiliev6944
    @georgiiliev6944 ปีที่แล้ว +1

    thank you for sharing this with us!!!

  • @cheesierglint02
    @cheesierglint02 ปีที่แล้ว +1

    Best video ever. This must have taken so much work

  • @argus9613
    @argus9613 ปีที่แล้ว

    Thank you man for sharing this stuff