This video is such an excellent resource. It starts to bridge the gap between what happens at a low level hardware in gates, registers, RAM chips, etc., and high level software such as how higher level languages and operating systems use the underlying resources. This is what is missing from other videos. I have watched many computer series on how to build breadboard computers. Excellent!
This series just keeps getting better! I’ve been trying to learn how to use C on the 6502 breadboard computer for a while and this video taught me a lot about how C and Assembly are related for a target like this. Thanks so much!
Back when I was programming on DOS, I never understood WHY the Pascal and C calling conventions were different and always assumed it was an arbitrary decision. I had never considered that it was because C has variadic functions. Which also explains why, in Pascal, we had to write(X); write(Y); writeln(Z); where, in C, we could just printf("", X, Y, Z); A classic example of the non-existence of "right" and "wrong": If I was coding your delay loops on one of my ATTiny microcontrollers, I would make the delay loop a macro rather than a subroutine. Where flash is fairly plentiful and I tend to have room for as much repeated code as I care to include, RAM is highly precious and even a couple of bytes for a return stack are painful and if I start to push and pop registers either side of the subroutine call make it even worse. But I do have a lot more general purpose registers on an ATTiny than you've got on your 8086. Fascinating series, with loads of people building 6502 breadboard computers, it's nice to see someone giving some of the other architectures some love.
Slight gotcha with .bss: It's true that elements are / should be initialised to 0 when put there but the mechanism behind it is slightly devious. -Only items that are to be stored in ram but haven't had their value set to anything will end up there. Regular data typically end up in .data (rarely .text depending on the compiler) no matter if they're set to 0 or some other value. :)
I wonder if you went a bit too fast from "logic gates, and busses, and instructions, and LEDs and tinkering, and lets just chill here" to "hardcore C code calling convention", but you explain it beautifully, and I guess your audience is capable and longing for more. :)
You may be right. Originally I started this series just for fun and maybe didn't plan it well. Also, I didn't want it to be x86 programming tutorial, so yes - I skipped a lot. But calling conventions seemed quite important to me as I wanted to mix C and assembler, so that's why I included them in this video. I hope it is digestible enough ;-) Thanks!
Yes, I enjoyed and understood the series as far as this video by pausing occasionally and rewinding. But this video assumes too much prior knowledge, as though there's an hour or so of material missing, and I don't know where to get that information from. I think it would help if you gave the software development side of the project the same treatment that you gave to the logic gates.
Thank you very much Simon! I'm really happy you like it. Integrating 8087 with my current build is not trivial as it would require switching the CPU bus from the minimum to maximum mode and thus requiring to add in the 8288 chip (which I do have in my collection). But that would mean significant changes to the wiring. Having said that, I'm considering how could I do it anyway and definitely I'm adding this idea to the list of things to do after I have achieved my main goal (play a video game on the computer). I have already got a few interesting ideas from my viewers. Thank you, Simon, and others who gave me these.
@@SladorSoft I've been researching this a bit, looks like you need a whole set of different ICs to make this happen. Do you know if you need the 8289 as well as the 8288, along with a couple address latches and the octal transievers?
I think the charme right now is that it is a 8088 breadboard computer that has a typical maker-LCD connected to it, with a lot of the interfacing solved in a very creative and reduced-cost way. This as juxtaposition to all 6502 / Arudino / etc. projects out there. If he starts adding a 8087 and the dozen support chips, he almost ends up with an IBM PC, not a breadboard computer. I should hope he refrains from using ANY of the official old chips, no official PIC, unique solutions like he does right now.
Yes, you're perfectly right, Simon. I do have some 8288s, but not the 8289. Maybe at some point I will have a look around if it can be purchased somewhere, when I plan to actually do this. I'll keep it as my future plans, but I wouldn't hold my breath for it to happen. ;-)
Great video! Just as a funny remark: I think the first thing a C compiler does is inlining everything you factored out into functions and probably unrolls the loops ;)
I'm kind of curious why you opted for a delay loop as opposed to what the LCD manufacturer intended, which was actually polling the busy flag, like how Ben Eater did it on his 6502 build.
The only reason was a trade-off. I explained it in "part 4" of this series around 16:20 mark (th-cam.com/video/62Jd4hlm5Fc/w-d-xo.html). I wanted to keep the additional logic as simple as possible and decided to only write to the LCD.
Thank you very much for the series. I am trying to build a similar 8088 PC with a NEC V20. I am trying to implement it with modern components as much as possible (to reduce cost and more availability). Do you have any information on 8259A PIC equivalent implementation? I was also thinking to use ATTINY85 for CLK and RST generation with internal 2 pre scaler timers without any external crystal, instead of using 8284
Great idea! I must say that I'm going to use some modern chips in my design as well, but in my case I had my 8259A, so I simply used it directly for my demonstration. Unfortunately, I have never heard about any implementation of 8259A in modern controllers, but I can imagine that one may exists, since I have read about FPGA implementation of the 80C188, so it is possible that someone has done it.
Hi, I've found your series just now and I must say that I like it really very much! From your site I "discovered" the gcc for x86... Great! May be I'll try it with my V20HL SBC I made two yours ago (V20-MBC). Currently too much involved in other things... too much toys for my little free time...
Oh, thank you! The GCC port has its own limitations (I didn't manage to make it compiling code for any other but the "tiny" memory model), but it supports C++14, which is way better than any other ancient alternative. Obviously, I have heard about your V20-MBC - that's a really interesting project. I saw the PCBs for your project available on eBay ;-) Cheers!
That's weird. I'm using KiCad 6.02 to save them. They recently changed the file extension for their files, so maybe they cannot be opened by older versions? If you are using version 6, but still are not able to open them, would you please let me know, so I can get a closer look? Anyway, I added PDFs as well - thanks for your great suggestion!
Yes, I'm aware of that and I'm really sorry. Unfortunately, all of those videos involving coding should be preferably watched on a bigger screen, I'm afraid. I hope you you can forgive me that.
@@SladorSoft please don't worry, without your videos I probably wouldn't have progressed any on 8086 assembly, really invaluable stuff, thank you very much.
This video is such an excellent resource. It starts to bridge the gap between what happens at a low level hardware in gates, registers, RAM chips, etc., and high level software such as how higher level languages and operating systems use the underlying resources. This is what is missing from other videos. I have watched many computer series on how to build breadboard computers. Excellent!
This series just keeps getting better! I’ve been trying to learn how to use C on the 6502 breadboard computer for a while and this video taught me a lot about how C and Assembly are related for a target like this. Thanks so much!
Loving this series so much! You are great teacher. Thanks Slador!
Thank you very much Mark. I'm already working on the next video in this series. Two more chips are coming to my breadboards. Stay tuned! ;-)
Each episode more interesting than the previous.
@bitlong4669 Thank you very much!
Thanks for the quick reply; I used version 5 of Kicad to try and view the files, that is why I was having problems.
Back when I was programming on DOS, I never understood WHY the Pascal and C calling conventions were different and always assumed it was an arbitrary decision. I had never considered that it was because C has variadic functions. Which also explains why, in Pascal, we had to write(X); write(Y); writeln(Z); where, in C, we could just printf("", X, Y, Z);
A classic example of the non-existence of "right" and "wrong": If I was coding your delay loops on one of my ATTiny microcontrollers, I would make the delay loop a macro rather than a subroutine. Where flash is fairly plentiful and I tend to have room for as much repeated code as I care to include, RAM is highly precious and even a couple of bytes for a return stack are painful and if I start to push and pop registers either side of the subroutine call make it even worse. But I do have a lot more general purpose registers on an ATTiny than you've got on your 8086.
Fascinating series, with loads of people building 6502 breadboard computers, it's nice to see someone giving some of the other architectures some love.
Slight gotcha with .bss: It's true that elements are / should be initialised to 0 when put there but the mechanism behind it is slightly devious. -Only items that are to be stored in ram but haven't had their value set to anything will end up there. Regular data typically end up in .data (rarely .text depending on the compiler) no matter if they're set to 0 or some other value. :)
I wonder if you went a bit too fast from "logic gates, and busses, and instructions, and LEDs and tinkering, and lets just chill here" to "hardcore C code calling convention", but you explain it beautifully, and I guess your audience is capable and longing for more. :)
You may be right. Originally I started this series just for fun and maybe didn't plan it well. Also, I didn't want it to be x86 programming tutorial, so yes - I skipped a lot. But calling conventions seemed quite important to me as I wanted to mix C and assembler, so that's why I included them in this video. I hope it is digestible enough ;-) Thanks!
Yes, I enjoyed and understood the series as far as this video by pausing occasionally and rewinding. But this video assumes too much prior knowledge, as though there's an hour or so of material missing, and I don't know where to get that information from. I think it would help if you gave the software development side of the project the same treatment that you gave to the logic gates.
شكرا..عمل جيد وممتاز
This is amazing! Will you try and integrate an 8087 to the mix? That would be absolutely fantastic!
Thank you very much Simon! I'm really happy you like it.
Integrating 8087 with my current build is not trivial as it would require switching the CPU bus from the minimum to maximum mode and thus requiring to add in the 8288 chip (which I do have in my collection). But that would mean significant changes to the wiring.
Having said that, I'm considering how could I do it anyway and definitely I'm adding this idea to the list of things to do after I have achieved my main goal (play a video game on the computer). I have already got a few interesting ideas from my viewers. Thank you, Simon, and others who gave me these.
@@SladorSoft This is awesome! I'm really looking forward to the other videos! I'm learning a lot!
@@SladorSoft I've been researching this a bit, looks like you need a whole set of different ICs to make this happen. Do you know if you need the 8289 as well as the 8288, along with a couple address latches and the octal transievers?
I think the charme right now is that it is a 8088 breadboard computer that has a typical maker-LCD connected to it, with a lot of the interfacing solved in a very creative and reduced-cost way. This as juxtaposition to all 6502 / Arudino / etc. projects out there. If he starts adding a 8087 and the dozen support chips, he almost ends up with an IBM PC, not a breadboard computer.
I should hope he refrains from using ANY of the official old chips, no official PIC, unique solutions like he does right now.
Yes, you're perfectly right, Simon. I do have some 8288s, but not the 8289. Maybe at some point I will have a look around if it can be purchased somewhere, when I plan to actually do this. I'll keep it as my future plans, but I wouldn't hold my breath for it to happen. ;-)
Great video! Just as a funny remark: I think the first thing a C compiler does is inlining everything you factored out into functions and probably unrolls the loops ;)
Without enabling optimizations you will pretty much get what is showed in the video.
Thanks
I'm kind of curious why you opted for a delay loop as opposed to what the LCD manufacturer intended, which was actually polling the busy flag, like how Ben Eater did it on his 6502 build.
The only reason was a trade-off. I explained it in "part 4" of this series around 16:20 mark (th-cam.com/video/62Jd4hlm5Fc/w-d-xo.html). I wanted to keep the additional logic as simple as possible and decided to only write to the LCD.
Thank you very much for the series. I am trying to build a similar 8088 PC with a NEC V20. I am trying to implement it with modern components as much as possible (to reduce cost and more availability). Do you have any information on 8259A PIC equivalent implementation? I was also thinking to use ATTINY85 for CLK and RST generation with internal 2 pre scaler timers without any external crystal, instead of using 8284
Great idea! I must say that I'm going to use some modern chips in my design as well, but in my case I had my 8259A, so I simply used it directly for my demonstration. Unfortunately, I have never heard about any implementation of 8259A in modern controllers, but I can imagine that one may exists, since I have read about FPGA implementation of the 80C188, so it is possible that someone has done it.
Hi, I've found your series just now and I must say that I like it really very much! From your site I "discovered" the gcc for x86... Great! May be I'll try it with my V20HL SBC I made two yours ago (V20-MBC). Currently too much involved in other things... too much toys for my little free time...
Oh, thank you! The GCC port has its own limitations (I didn't manage to make it compiling code for any other but the "tiny" memory model), but it supports C++14, which is way better than any other ancient alternative.
Obviously, I have heard about your V20-MBC - that's a really interesting project. I saw the PCBs for your project available on eBay ;-)
Cheers!
Great Video, but the font of the VScode window is much to small. I need a magnifier to follow your code explanation on a 42” Monitor…
Thank you! Yes, I am aware of that and I made the font larger in later videos ;-)
Could you export your schematics as ".pdf"s. I was not able to read them with kicad; it erred on the files provided.
That's weird. I'm using KiCad 6.02 to save them. They recently changed the file extension for their files, so maybe they cannot be opened by older versions? If you are using version 6, but still are not able to open them, would you please let me know, so I can get a closer look?
Anyway, I added PDFs as well - thanks for your great suggestion!
hi. I really love your video series about x86 computer! can you please share sources for your project?
Thank you! Please have a look at slador.uk/ - you'll find there a link to my GitHub with all the sources
@@SladorSoft found :) thanks a lot
Can't see where you are physically writing data into appropriate positions in memory. Excellent video tho
Thank you! As you might notice - I explained myself about the flashing under your other comment to the "Part 6" video ;-) Cheers!
Oh no this poor processor, I sense it's about to receive more interrupts than an engineer sharing an office with the sales team lol.
6:42 unfortunately this text is unreadable from my 5' smartphone
Yes, I'm aware of that and I'm really sorry. Unfortunately, all of those videos involving coding should be preferably watched on a bigger screen, I'm afraid. I hope you you can forgive me that.
@@SladorSoft please don't worry, without your videos I probably wouldn't have progressed any on 8086 assembly, really invaluable stuff, thank you very much.
@@SladorSoft “magnifier app” May come in handy….