BONUS: How I built my own computer, from scratch
Vložit
- čas přidán 8. 06. 2024
- big dum dum rambles about mess of spaghetti wires
SEE THE MAIN VIDEO: • I built my own compute...
PATREON: / jdah
OTHER VIDEOS ON THE JDH-8:
* GRAPHICS: • I built my own graphic...
* DESIGN: • I designed my own 8-bi...
CODE: github.com/jdah/jdh-8
EDITOR: NeoVim
VIMRC: gist.github.com/jdah/4b4d98c2...
THEME: gruvbox
CIRCUIT DESIGNER: Logisim-Evolution (github.com/logisim-evolution/...)
RESOURCES:
The Elements of Computing Systems by Noam Nisan and Shimon Schocken
@BenEater 's Channel: / eaterbc
@Esperantanaso 's DUO Adept: • An 8-Bit TTL CPU + GPU - Věda a technologie
"i'm barely even a computer scientist not a particulary great programmer"
what a humble guy
I'm literally graduating in cs this week and I would definitely not be able to accomplish something like this
That one macro he showed in his second video on his Minecraft clone _was_ one of the most horrible pieces of code that I've ever seen, but that was due to time constraints and he refactored it out later.
@@Blue-Maned_Hawk Exactly what whent wrong? The minute of that horrible code?
@@muromaruo5986 , I'm not quite sure what you're trying to say. Could you please restate it?
@Transphobes hate me probably something like using if/ifelse statements instead of switch statements idk tho
You give a whole new meaning to "full stack engineer."
Ha! Gold comment.
Ha! Gold comment.
yo, don't give them ideas
Time for him to implement his server in electronics and run his website on it, and that will be truly full stack engineering
Ha! Gold comment.
Dude, you say ''I'm not an engineer'', 98% of the engineers I know would not be able to even remotely understand, yet alone do, what you did there... Well done! This is absolutely brilliant and amazing! 😍
Like structural or civil engineers? Any computer or electrical engineer should know all of this.
@@Mikey-gs1dx sadly not only, and I agree with you, but many engineers end up overlooking the bases, upon which the tech they're working on, are built
@@Mikey-gs1dx most cs students skip assembly how assemblers work and even logic gates and just learn a high level language like python, Java script or c++ and get a job.
Most electrical, electronics and computer engineers should absolutely be able to understand this. Like that is what we study haha.
@@IO-_-Ol of course, the specialists, though I know some who wouldn't be able to. But I was speaking of the generalist engineers
JDH: "I'm barely even a computer scientist"
Also JDH: proceeds to build an entire computer from ICs and breadboards
As I understand it, it's similar to what people (nerds) just did before companies started selling pre-built PCs like the Apple 2.
Thanks for the shout-out to my work on the DUO Adept!
:O I really can't even begin to say how much your videos influenced me, not only on this project but like my whole career trajectory. I've probably watched those videos on the Adept 10 times each (plenty when I was much younger). Hope you like the videos :)
If this guy isn't a particularly great programmer I am so screwed
I would say the same for myself. Even if I have knowledge on programming, its how I apply that knowledge that matters.
Thank you for making this video, the more in-depth look at the jdh-8 was very interesting!
When ever I lose motivation to code I just watch a jdh video. Sumn abt them just makes me want to get better and maybe one day do something like this
crazy crazy guy! I remember debuging couple of Ben's modules, problems with capacitance, decoupling capacitors, broken wires, bad chips, clock signals, power module,.... Doing it on 5 times larger project must have been a nightmare. Great job, all the best
You're a legend
Building your pc completely literally by yourself!
I loved seeing this! Pretty fun stuff :D. I've built a few toy CPUs over the years. My most recent was an 8 bit CPU more similar to the MOS 6502 but with more consistent addressing modes. (and an incompatible instruction set).
Congratulations on your effort, and thanks for providing these details.
This is so good :D Always love your vids
Can’t wait to see what software you make for it!
I love the project! I think it would be fun to see a reimplementation on pcbs to avoid wiring, perhaps addressing some of the points for improvement you mentioned in the last video. :)
Hey, can you test it's performance? A collegue of mine and I have build several ben eater inspired PC's.
We have a 4-bit PC, a 8-bit ben eater identical one and one 16-bit computer. All run at 2 Mhz. We build it just like you did it. For performance testing we run a simple prime number calculation. I post the "pseudo" code that the 16-bit one runs down below. For the other we had to get creative to count to 10000, but we did it on each one.
The 16-bit PC takes 46 Minutes without a discrete bit-shift extension card and 32 seconds with the discrete bit-shift card. Without it has to do multiplication and division by addition xD
The 8-bit took about a day to get to the prime number of 4000 so testing to 10000 wasn't feasible.
Maybe you can test the algorithm on your PC and send some Benchmark results.
for($zahl = 3; $zahl < 10000)
$prim = true
$half = $zahl
sqrt($half)
$tester = 2
while($tester < $half)
$mod = $zahl % $tester
if($mod==0)
$prim = false
end
$tester++
while-end
$zahl++
if($prim)
$prim = $zahl - 1
$found++
log($prim)
end
for++($zahl)
log($found)
For sure! I'll give it a try and try to remember to get back to you. Shouldn't be too tough :)
AND WHERE IS THE VIDEO????
@@kostis2849 damn dude chill
@@jdh So how did it perform?
Very Good.- thank you for taking the time to make the video
Nice video! You should have flipped the value of the Y instruction bit so that zero bytes are always effectively a NOP though!
Yeah, this is another one of the design issues I decided was too small to mention - would have been nice. but good you caught it too!
@@jdh Really looking forward to more details about this project, you're doing the thing I've wanted to do for a long time!
I made a processor in Minecraft, and I thought that was a generally painful process when it came to debugging and getting everything working. Now that looks like a little baby processor compared to this thing. You're out of your mind, in a good way.
To be fair though, in minecraft you have a LOT of limitations such as distance of signal and having to build each logic gate separately so it's still very impressive
Amazing work, certainly does well on your C.V.
Yo we're blessed with two videos in one day!
Your projects are absolutely amazing! Giant inspiration.
What do you work with when not doing these freetime projects?
This is awesome! Question about the CMP instruction:
In the spec you have it as CMP^ reg, imm8/reg -> reg = reg + imm8/reg
It looks like it's defined the same as the ADD instruction and also the destination register is modified. Is this a mistake in the spec or is CMP the same as the ADD instruction?
If this is a mistake, I know most architectures define CMP as basically a subtraction which modify the flags, but then throw out the result, is this how JDH-8 works?
Apologies if this was answered in the video and I missed it.
Oh oops, that is actually a spec mistake! Good catch. The CMP instruction doesn’t modify the destination register at all.
This is amazing! You are such a cool person!
I'm so glad I found your channel
Everybody is so excited about his homemade computer while I'm just here staring at his perfect hair 😳
That macro assembler alone is a _huge_ project. Much more advanced then many assemblers from back in the day.
Personally I would have used a well known macro assembler to lower macro assembly to your assembly.
Then again, this whole project is about doing everything by hand :D
Bro u have done it thanks for the explanation
jdh: "i built a computer from scratch get rekt noobs"
also jdh: "i don't know how to pronounce CMOS"
When people do not know how to pronounce certain words, it means that they learned these words by reading. So not knowing how to pronounce words should actually command some respect.
@@kostis2849 read = respect? Also, Just because i read doesn't mean i can't read pronunciations of words.
@@FaZekiller-qe3uf If you look up the pronunciation of every new word you read, you have my respect.
Ta Loco, “I’m not a good programmer”. Jokes aside I love the videos, keep entertaining!
people(professors and students) get annoyed by me when i ask this type of low level hardware related question i used to had in mind and they couldn't explain it and try to ignore my question all the time. and when i tear the internet a part i found it's simple(not that simple but can be understandable) but made up of lot's of different things in it's own unique structure and that's what makes it more complicated. the reason i wanted to know all this so that i could make my own things in my own style to become independent and also this is fascinating to see how it all works at a fundamental level..
"not a good programming guy"
yeah, and then there's me, Master electricla engineering who has to look up syntax for loops
This is really impressive. I have to ask, what's your background?
this dude talented af!
"not a partically good computer programmer"
PROCEEDS TO MAKE A DECENT VERSION OF MINECRAFT IN 24 HOURS
this is really cool! i'm also working on a custom CPU build and I was wondering how you do memory mapping exactly? I can think of various approaches but they all seem really bad. thanks!
This seems to have been almost a mini moon-landing-mission-type of operation. You cannot have arrived already. This is so much more now. This computer and the process you followed to get there needs a proper post-mortem. I would like to see Ben Eater or even the other legend James Sharman, review you computer and extract much more educational value from it. I am amazed by your dedication and I personally think that you more than deserve the 100k subscribers. So when will version 2 of the computer come out - surely this was not a once-off thing?
16 bit commands, the word 'command' is the word you search or 16 bit addresses (depends on the context, commands and addresses usually do not have to be the same length)
I’m a computer “scientist” and I think you did a great job building a functional computer system. I plan to build a simpler one and probably upload the project video to my CZcams channel.👍
I think xor operation would be better than nor.
And you can free one or even two instructions space by making subtracting possibility with no adding, then it will be still possible to add by (a - (0 - b))
It's easy to criticize design choices made, but nice to see you dived into it without spending ages on perfecting the architecture. The joy is in making it, not getting it perfect as that ofte results in stuff never being started on in the first place. And the fact that you even have a full graphic display is rather daunting where most would be happy with a few flashing leds or at most a small 2x16 chars lcd screen.
Hey very good video. I wanted to ask if there is a list of the required components somewhere ?
I tried x86 a while ago but I wasn't really able to do any meaningful programs. The way jdh explains things did actually answer many of my questions! Thank you dude I really appreciate your videos :)
1:58 Close but not quite first one (at least what is now generally considered as first) was intel 4004.
yo, dude. Nice build. Can it display video? If so how do you update frame buffer memory? You gotta stress test your graphics card with the nyan cat gif
it can output
czcams.com/video/vaGZapAGvwM/video.html
Crazy !!!
Where are you working now ?
this is sooooo cool.really
Mate, I have no words
Use an SST Flash chip for the ucode, flash access times on that chip are like less than 100 ns
He says he's not an engineer, as he proceeds to make a thesis material
computer scientist + electronics engineer
physician: hold my bear
Are the 3, Z bits after the Y bit in the instruction layout section don't care bits in the case where the Y bit is not set?
please 4k fullscreen
this is fucking sick bro! congratulations 👏
Next, writing your own programming language and compiler to run on your custom cpu
People are building a friggin computer from scratch and here I am studying for a physics final. My life sucks lol.
Great video. Your whole journey from emulating it to actually building one was really inspiring. I'll try building one too after my exams are over haha :)
if i had your mindset, my life too would suck
How did you research for this? Who did you learn how to do this from?
Hey, did you ever get around to making the PR for those extra ICs you added to logisim-evolution?
Oh, also, thanks for the thorough explanation. Very informative and educational, and a very cool project, indeed.
New Episode!
thankyou very much ,please show me the shematic because i can't made it with logisim
Is there an alternate architecute other then load/store?
CPUs that can do a load and/or store from memory in the same instruction as an ALU operation are usually not considered "load/store", such as the venerable 6502, Z80, x86, 68K, and so on.
"RISC" designs are often called load store, because they have only dedicated instructions for that. ALU instructions are not able to do it by themselves in these CPUs.
Next: I built my own universe and reality from scrath
Good chanel od grafa
i really wish that logisim has a dark mode
Well, it's open source. Just change it.
If this guy isn't a particularly great programmer I am so screwed. You're a legend Building your pc completely literally by yourself!.
Hello, jdh.
My name is Alex, I long time wanted to make the same homemade computer. In the last week I have been studying various home computer projects (one of them diy transistor computer with 7 mhz clock). May I ask you a couple of questions about some aspects of the implementation.
I wanted to build a PC with transistors, just lots and lots NPN transistors.
Never got around to it. I never did any math or anything but between the CPU/MEM/GPU
id probably need like 500K for the most basic 8bit 8KB/2KB PC lol
the power requirements would be hilarious.
26:23 Your JLE macro is broken. You are missing a test case. ;)
Am i the only one who realize how handsome this guy is?
Do you know if anyone has made a LLVM-compatible DIY computer? I know it would entail a truckload more work but it would really be an awesome thing to have multiple language supported with just another backend. Even implementing a backend is another ordeal altogether, apparently :)
Nice
Would you mind sharing your vimrc config file?
Amazing build. To get that clock speed up how about chilled water cooler? Then you could have a mass of pipes on top of the mass of wires. And possibly the only water cooled breadboard computer in the world. %-)
It wouldn't do anything. Temperature isn't the problem here. It's the actual design of the computer itself.
ur wild bro
You should make your own fully code language.
Only an idea if someone build it self you could use the ZZZ bits for more advanced / complex CPU instructions !
if (Y==0)
if (ZZZ==0)
argument is im(8/16)
else
ZZZ is a 1 of 8 selector in fast zero page memory (8 x 16 bit pointer locations or 8 x 16bit memory registers or 8 x16bit counters or 8 x 16bit predefined port addresses ... or any 8 more CPU instructions)
Are we gonna ignore the fact this man so f HANDSOME🗿🗿?
graf poleca
yes a totaly understand
Hello, I am a student from Switzerland who is slowly approaching the Matura. For the Matura we have to hand in a paper, about any topic. I want to build my own CPU, respectively emulate it with a hardware description language. Therefore I would like to ask if the goal is too difficult for a 17 year old. If not, what resources should I use to learn most effectively.
Btw. the video was awesome!
I did (tried to do/prototype with logic software) something like this when I was 15. It's not too hard, but you will need to persist a lot. You can really make them as simple or complicated as you want, but it would obviously help to have an understanding of boolean logic, some programming experience (esp with a language like C), and some basic knowledge of electronics. None of these things are really required though except for the boolean logic part, and you also need to understand how binary numbers work. My advice would be to just look at other people's videos/designs/schematics/etc after learning logic symbols (AND/OR/NOT/etc) and trying to understand how they actually work logically.
@@danielmoylan3033 Thank you very much!
Same here. Also from switzerland. Thinking about doing the same.
Schöns Tägli no!
@@rusus767 HAHAHHAH huere geil, merci gliichfals! Au für d Matura oder ischs eifa es chlises Projekt nebebii?
any extra registers are vector instruction registers, simd instructions
reminds from the "high" memory of x86
how high you must be to enjoy everything
one one is good, many are dirt
DAMN
can you release the logisim files for the computer? :=
nice
We all know the original title was "I built my own computer. by hand.". BTW nice video JDH. Now make an OS for this.
That's a different video
that was a different video lmao
@@dot32 wait what lol
@@dot32 ah shit he now updated the title to add BONUS. I thought he deleted the old one and uploaded a new one lol
@@yeppiidev ahh right, i was confused for a moment too (but then read bonus)
Outstanding work. When he designed the Apple I and II, Steve Wozniak did not even design the CPU himself. So this work puts you above Woz, in a way. Dedicating an instruction to switch memory banks is something we sorely needed in the 80s, and yet no processor I know of provided it (not in the successful machines on the market at least). Thinking about it, you were very close to designing a multitasking CPU (move the registers to memory, as you suggested somewhere else, assign one program and set of registers per bank, and add periodic or programmatic bank switching).
"I'm not a great programmer"
Also jdh
"today we're going to be making Minecraft in C without a game engine"
When will you do a Minecraft update again ?
Ok now write a C-compiler!
next thing we know hes gonna be doping his own silicon
lol collab with NileRed to make transistors, that would be legit fucking cool haha.
u r god
holy shit since when do you have 118k subs
when I started you were at like 1.5k
Bro I'm here to watch it run pong on the real hardware :)
the fact that you wouldn't even call yourself a "particularly great programmer" is giving me an existential crisis.
damn
For some reason he kinda looks like Dr. Luka Kovac frm ER drama
but can it run crisis?
(or even linux.)
I think ive heard on linux being able to be compiled on a 16 bit comp, but there is no way you could do a real mulithreaded OS on an 8 bit...
Absolutely not, unless you want to write your own drivers, bootloader, C compiler (to standard), and linker. Even then, I doubt a modern OS designed for PCI devices, paging, _having actual disk storage_ , and processors with more than one 1MHz core would even really work unless you strip out 95% of it and mangle the other 5%. And then, after you put in all of that work, you would cry because your code size exceeds the 64KiB ROM.
Practicaly - no, as linux needs MMU+MPU to virtualize memory. Technicaly you can emulate 32bit processor with MMU by software.
Linux was successfully launched on atmega with this technique. It worked, but took like 30 minutes to execute "ls".
One question, what kind of knowledge does one need to put together a computer of this kind?
Check out Ben Eater’s tutorial series on CZcams: he starts with how a transistor works and goes step by step until he has built a computer not too different from this one. If you watch the whole series he actually makes it seem almost simple.
One question it may well be...
But it's kinda of an unlimited open ended question that's impossible to answer. Certainly on a comments section.
A half hour Shlong?? Oh deary me!
#Blessed Cause u posted today lol