This is the coolest thing I've seen posted on HN in years, very cool work.
I've been playing with Atari 2600 programming on and off for the past few years and it is so fun programming directly against the specific hardware. I can't help but occasionally wonder if I could piece together a similar system, but I have 0 experience with electronics. I can only imagine how satisfying it must be to actually pull it off.
It really is super satisfying to get this far, I still turn it on sometimes just to check if it really works.
And I also had zero experience with electronics (and I still don't know as much as I should...), so yeah I think you could piece together something like this. :)
There is something weirdly satisfying about doing something purely for the sake of doing it. So many people start projects hoping they can turn it into a business or gain stars in Github - you see less and less people hacking stuff together just for personal enjoyment.
I think we need more of that too. Everyone seems to be on a quest for perfection: perfect code, 3D printed casing, everything intellectualised to the nth degree. There's a lot to be said for the "rough and ready" approach of experimentation. However to do that you really need to be on a pursuit for personal gratification because the internet is a harsh bitch for pointing out ones mistakes.
As much as I enjoy quickly building circuits on a breadboard like in many of the photos, they’re hell to debug, because there’s so much that can go subtly wrong. It’s much easier with digital than analog circuits, of course, but it still can be crazy hard to logic-probe every connection to get it all to work. I have spent far too much time fixing little bugs in breadboarded circuits. The toughest issue I encountered was when someone melted through part of a big, expensive breadboard with a soldering iron and it caused shorts on the other side of the board. I couldn’t even trust that the holes that were supposed to be connected were in that case, and I sure wasn’t going to copy over the project onto a new breadboard.
However, I’m not sure if there is an easier way to get quickly prototype electronics. Opting for more ICs and a lower BoM count helps, because there’s less wiring to do in the first place.
I would argue that with the extremely low cost of PCB manufacturing (and... if you have access to it... assembly) it's easier now to just lay out a PCB and get it made. The trick is to build up a library of circuit "modules" (like... power supply section, battery charging, video output, etc) that get copy-pasted together.
Of course there's the delay in waiting for the PCBs, which could be frustrating for a hobby project (I was lucky enough to live in SZ for a while where getting PCBs back 2 days after ordering is standard). But parallelising projects can be an effective way of dealing with that, and the variety on working on different things (and the joy of getting a PCB in the mail) can help to mitigate that.
I totally agree.
The reason I stuck to DIP ICs was because I could fit them into breadboards and I thought that was easier than any alternative.
I was incredibly lucky on how all the breadboards were functional.
And there were a few times where I would accidentally disconnect a wire and spend the next 2 hours trying to figure out what was wrong.
All this without having a logic analyser and not even an oscilloscope until much later in the build (they are not that cheap).
And yes the project sure is complex, too complex, but I guess I was lucky, and I'm glad it's working :).
Cardboard is a fantastic material. You can draw the schematic on, and then run copper tape along the schematic. It's easy to annotate, since you just need to use a pen. It's able to handle much more current than a breadboard, since the copper tape has a lot more metal than thin wires. You can solder directly to it, and with tape (or some other insulating material) you can cross wires without having them short.
You can also work with SMT ICs. Using a pair of scissors, you can make your own pads and solder to them. I connected an SO8 to read off the SPI data using copper tape. I built an amplifier using a spare Novena amplifier IC on cardboard with copper tape. And I have a level shifter done on cardboard with copper tape.
I've kept this project to myself and would only describe it occasionally to some coworkers and friends. I never thought that many people would find it cool. And always thought that people with more knowledge than me would find a lot of flaws.
So it's really awesome to read yours and all the other comments. :)
I don't think I could write a book, but I have though in writing other posts, giving more detail in certain aspects of the console.
There's really a lot I could say about it and I only realised how much there was to say when I started writing this.
It is sad that TAB books is no longer a thing, they totally would have published the "BUILD YOUR OWN VIDEO GAME" book. That said, I bet that you could get NoStarch Press to publish it.
Yeah, absolutely. Especially coming from a modern software developers POV. I always think it would be fun to get into electronics, but it just seems so much to take in.
Oh to built 20Mhz systems again! ... no picosecond timing skews to stress over, no ground plane worries, no trace-related design rule violations, no harmonic noise issues, no dynamic bus inversions to prevent victim/attacker degradation, no thermal issues... I spend so much time debugging GHz multi-layer circuit boards that I forget how "easy" 20MHz digital circuits can be. This guy's project is truly inspiring!
I would love to learn more and be able to work with faster circuits like you.
Yes it's way easier to work with "slow" digital circuits I had very little issues using breadboards and really long wires, that probably look cringy to you and others.
I've reading up about the architectures and programming of computers and consoles from the 80s and early 90s lately, and have been itching to do a similar project of my own, but have been kind of floundering on where to get started. The fact that you pulled this off inspires that this sorta thing can be done.
Have you considered doing a series of blog posts going into more detail on each section of the console and your journey in getting each bit working, describing failures and successes both? I think such would be instructional to other people who want to do some similar homebrew computer/console hacking.
I was kind of surprised that your PPU design was frame buffered instead of line buffered, but I suppose I perhaps shouldn't be. I imagine the PPU chips of old were line-buffered because RAM was expensive in the 80s, and it was a good enough interface to control a scanline-based display. In my recent reading about the architecture of 3rd, 4th, and 5th gen consoles, I noticed that the 5th gen systems became fully frame buffered, as memory had become cheap and fast enough in the early-mid 90s. And a frame buffer certainly feels a bit simpler and more intuitive to think with than a scanline buffer.
I am considering doing a series of blog posts, I don't know how often I could write them or if I could keep them going, but I will try.
I'm not big in social media and I have never written any posts or anything like before this one, which is weird, I'll admit it, so all this is kind of new, but I think I'll give it go.
Old systems used line-buffers like the Neo Geo or no buffers like the NES, for example.
So yeah, going with a frame-buffered approach was definitely easier, but this was not the only reason I chose this way.
I had a lot of restrictions, I was learning a lot of stuff, I didn't know how to work with FPGAs and I stuck with DIP package ICs that I could put on breadboards and experiment. And that's why I picked the AVR microcontrollers, which are awesome but have their disavantages. They have good performance (20Mhz), but not many pins and I had to bit-bang things like external RAM access (actually the PPU accesses 3 RAMs with only 32 IO pins available), which meant that it takes "some time" to access external memory.
That's why I chose 2 microcontrollers for video instead of just one, one of them could take "all the time in the world" (one frame) to fetch information and write a frame to the frame buffer while the other would generate the video signal and dump the a frame to the TV. Connecting the two, I felt a double buffer was better.
I definitely would have preferred doing a more "traditional" non-buffered render system, but this was the solution I found with what I had to work with.
I hope serves as a good explanation and maybe I'll get to explain these details better in another post :).
I know this has been said before but this is one of the coolest things I've seen posted here on HN. My undergrad is in computer engineering and this post brought back a flood of writing VHDL and doing design in Mentor Graphics.
I'm going to read this a few more times. It's like reading a good book about my hopes and dreams.
Thanks :) (I don't mind people saying it over and over again, believe me :P)
I actually started building a much smaller video game console with a cheap Cyclone II FPGA board (a friend of mine wanted one and I tried to figure it out how I could make something smaller and cheaper but still retro and cool) and I'm using VHDL, it's not exactly easy to learn but it's pretty cool, and I find it really hard to find good resources to learn from.
If I was to start all over again, I would use an FPGA for the graphics, for sure, at the time I just didn't know how.
This is a wonderful project. Well done. You might just inspire this software engineer to take his first crack at hardware. :)
One somewhat personal question, if you don't mind. You say you are Portuguese. Is English a second language for you? I don't see the telltale signs of a Portuguese -> English speaker (I have a lot of experience interacting with Portuguese speakers, and their English mistakes are pretty uniform due to the specific differences between the languages, esp regarding prepositions and tense). Your article, as many have noted, is beautifully written even for a native English speaker.
It's interesting how this kind of project has come into the realm of possibility of an individual's pet project (a smart individual, sure, but not a company).
I guess that the availability of information and materials through the internet has helped a lot. And also more people have knowledge in electronics and programming.
You're a top notch hacker, from high to low level. Not many people can do what you do. I know this is a hobby/fun project, but I really hope your current employer/clients appreciate and reward you commensurately!
I never comment on here. This was cool enough for me to try to figure out my password and log in and say that you are the tinkerer/creator I wish I could be.
I'm actually a bit overwhelmed with all the comments and I'm trying to answer at least a few of them.
Just wanted to say that, even without knowing you, I think you could absolutely be a tinkerer or creator, just choose something you would like to build, start small and go from there. :)
Shine on, dude, shine on. Inspiring! I love the fact that you've been working on this for a long time, yet 60 seconds ago I was completely unaware of it. What other amazing things are amazing people working on out there?
This is simply incredible. I teach high school and elementary kids, and the thing I'm always telling them and parents is how the added complexity and modern design of software and hardware have made it so challenging for kids to take a "peak" under the hood. Projects like this are such a wonderful way to really spark that curiosity between hardware and software. So inspirational!
You see this with grown up devs too. Many of them have only ever learnt to code with a full suite of build tools such as web pack, grunt and npm. They seem lost without these things and only a few really know what's going on under the hood. The best devs I've worked with are feel comfortable getting things done even when those tools are taken away.
I know that I am echoing the same sentiment, but how cool is this! In the video where you demo'd BASIC and had that ball bounce across the screen, my jaw literally dropped, and my mouth stayed open the whole rest of the page. Amazing :)
This is incredibly impressive! You should be very proud of yourself for not only having the knowledge to work through a project like this but also the discipline to see it through to fruition. Hats off!
Seeing all these breadboard cables going into a scart lead fills me with dread. One bump of the table and the chunky scart lead flexes in an unpredictable direction and rips out a subset of 4 hours of carefully set jumper cables. Not to mention the EM interference that so many wires must be generating.
At risk of being more "me too" about this, I am in awe of the hard-earned multi-disciplinary skills that went into making this. You should be proud of yourself :) Great project, and a great read.
I agree! I was just watching one of his videos the other day on creating a brand new 8-bit computer and I think he would be super interested in your work.
[+] [-] kgwxd|7 years ago|reply
I've been playing with Atari 2600 programming on and off for the past few years and it is so fun programming directly against the specific hardware. I can't help but occasionally wonder if I could piece together a similar system, but I have 0 experience with electronics. I can only imagine how satisfying it must be to actually pull it off.
[+] [-] pkiller|7 years ago|reply
It really is super satisfying to get this far, I still turn it on sometimes just to check if it really works.
And I also had zero experience with electronics (and I still don't know as much as I should...), so yeah I think you could piece together something like this. :)
[+] [-] pushpop|7 years ago|reply
I think we need more of that too. Everyone seems to be on a quest for perfection: perfect code, 3D printed casing, everything intellectualised to the nth degree. There's a lot to be said for the "rough and ready" approach of experimentation. However to do that you really need to be on a pursuit for personal gratification because the internet is a harsh bitch for pointing out ones mistakes.
[+] [-] bredren|7 years ago|reply
[+] [-] snazz|7 years ago|reply
However, I’m not sure if there is an easier way to get quickly prototype electronics. Opting for more ICs and a lower BoM count helps, because there’s less wiring to do in the first place.
[+] [-] janekm|7 years ago|reply
[+] [-] pkiller|7 years ago|reply
[+] [-] xobs|7 years ago|reply
Cardboard is a fantastic material. You can draw the schematic on, and then run copper tape along the schematic. It's easy to annotate, since you just need to use a pen. It's able to handle much more current than a breadboard, since the copper tape has a lot more metal than thin wires. You can solder directly to it, and with tape (or some other insulating material) you can cross wires without having them short.
You can also work with SMT ICs. Using a pair of scissors, you can make your own pads and solder to them. I connected an SO8 to read off the SPI data using copper tape. I built an amplifier using a spare Novena amplifier IC on cardboard with copper tape. And I have a level shifter done on cardboard with copper tape.
Bunnie has a good article on it here, including an example power regulator that's handling 2A on cardboard: https://www.bunniestudios.com/blog/?p=5259
[+] [-] beachy|7 years ago|reply
(It seems like it's still a thing in fact http://www.nutsvolts.com/magazine/article/wire_wrap_is_alive...)
[+] [-] kotrunga|7 years ago|reply
Great job
[+] [-] pkiller|7 years ago|reply
I've kept this project to myself and would only describe it occasionally to some coworkers and friends. I never thought that many people would find it cool. And always thought that people with more knowledge than me would find a lot of flaws. So it's really awesome to read yours and all the other comments. :)
I don't think I could write a book, but I have though in writing other posts, giving more detail in certain aspects of the console. There's really a lot I could say about it and I only realised how much there was to say when I started writing this.
[+] [-] iooi|7 years ago|reply
[+] [-] bluedino|7 years ago|reply
He wrote a handful of game programming books in the 90’s as well.
[+] [-] ChuckMcM|7 years ago|reply
[+] [-] TomAnthony|7 years ago|reply
[+] [-] pjc50|7 years ago|reply
[+] [-] dejaime|7 years ago|reply
[+] [-] iheartpotatoes|7 years ago|reply
[+] [-] pkiller|7 years ago|reply
I would love to learn more and be able to work with faster circuits like you. Yes it's way easier to work with "slow" digital circuits I had very little issues using breadboards and really long wires, that probably look cringy to you and others.
[+] [-] cushychicken|7 years ago|reply
[+] [-] korethr|7 years ago|reply
I've reading up about the architectures and programming of computers and consoles from the 80s and early 90s lately, and have been itching to do a similar project of my own, but have been kind of floundering on where to get started. The fact that you pulled this off inspires that this sorta thing can be done.
Have you considered doing a series of blog posts going into more detail on each section of the console and your journey in getting each bit working, describing failures and successes both? I think such would be instructional to other people who want to do some similar homebrew computer/console hacking.
I was kind of surprised that your PPU design was frame buffered instead of line buffered, but I suppose I perhaps shouldn't be. I imagine the PPU chips of old were line-buffered because RAM was expensive in the 80s, and it was a good enough interface to control a scanline-based display. In my recent reading about the architecture of 3rd, 4th, and 5th gen consoles, I noticed that the 5th gen systems became fully frame buffered, as memory had become cheap and fast enough in the early-mid 90s. And a frame buffer certainly feels a bit simpler and more intuitive to think with than a scanline buffer.
[+] [-] pkiller|7 years ago|reply
I am considering doing a series of blog posts, I don't know how often I could write them or if I could keep them going, but I will try. I'm not big in social media and I have never written any posts or anything like before this one, which is weird, I'll admit it, so all this is kind of new, but I think I'll give it go.
Old systems used line-buffers like the Neo Geo or no buffers like the NES, for example. So yeah, going with a frame-buffered approach was definitely easier, but this was not the only reason I chose this way. I had a lot of restrictions, I was learning a lot of stuff, I didn't know how to work with FPGAs and I stuck with DIP package ICs that I could put on breadboards and experiment. And that's why I picked the AVR microcontrollers, which are awesome but have their disavantages. They have good performance (20Mhz), but not many pins and I had to bit-bang things like external RAM access (actually the PPU accesses 3 RAMs with only 32 IO pins available), which meant that it takes "some time" to access external memory. That's why I chose 2 microcontrollers for video instead of just one, one of them could take "all the time in the world" (one frame) to fetch information and write a frame to the frame buffer while the other would generate the video signal and dump the a frame to the TV. Connecting the two, I felt a double buffer was better.
I definitely would have preferred doing a more "traditional" non-buffered render system, but this was the solution I found with what I had to work with.
I hope serves as a good explanation and maybe I'll get to explain these details better in another post :).
[+] [-] Yhippa|7 years ago|reply
I'm going to read this a few more times. It's like reading a good book about my hopes and dreams.
[+] [-] pkiller|7 years ago|reply
I actually started building a much smaller video game console with a cheap Cyclone II FPGA board (a friend of mine wanted one and I tried to figure it out how I could make something smaller and cheaper but still retro and cool) and I'm using VHDL, it's not exactly easy to learn but it's pretty cool, and I find it really hard to find good resources to learn from.
If I was to start all over again, I would use an FPGA for the graphics, for sure, at the time I just didn't know how.
And thanks again for the comment :)
[+] [-] Rooster61|7 years ago|reply
One somewhat personal question, if you don't mind. You say you are Portuguese. Is English a second language for you? I don't see the telltale signs of a Portuguese -> English speaker (I have a lot of experience interacting with Portuguese speakers, and their English mistakes are pretty uniform due to the specific differences between the languages, esp regarding prepositions and tense). Your article, as many have noted, is beautifully written even for a native English speaker.
[+] [-] forinti|7 years ago|reply
I guess that the availability of information and materials through the internet has helped a lot. And also more people have knowledge in electronics and programming.
Great job, Sérgio. É muito giro.
[+] [-] osrec|7 years ago|reply
[+] [-] eldavojohn|7 years ago|reply
[+] [-] pkiller|7 years ago|reply
I'm actually a bit overwhelmed with all the comments and I'm trying to answer at least a few of them.
Just wanted to say that, even without knowing you, I think you could absolutely be a tinkerer or creator, just choose something you would like to build, start small and go from there. :)
[+] [-] stevenjohns|7 years ago|reply
Can you recommend the materials you used when learning? Books or resources etc.
This was a really interesting read, thanks for sharing.
[+] [-] JabavuAdams|7 years ago|reply
[+] [-] drinfinity|7 years ago|reply
[deleted]
[+] [-] ChicagoBoy11|7 years ago|reply
[+] [-] osrec|7 years ago|reply
[+] [-] steve_avery|7 years ago|reply
[+] [-] tmountain|7 years ago|reply
[+] [-] nonamenoslogan|7 years ago|reply
[+] [-] cristoperb|7 years ago|reply
[+] [-] ty_2k|7 years ago|reply
[+] [-] rkachowski|7 years ago|reply
Seeing all these breadboard cables going into a scart lead fills me with dread. One bump of the table and the chunky scart lead flexes in an unpredictable direction and rips out a subset of 4 hours of carefully set jumper cables. Not to mention the EM interference that so many wires must be generating.
This is very cool.
[+] [-] lewiscollard|7 years ago|reply
[+] [-] pkiller|7 years ago|reply
I am proud and honestly reading all these comments of people like you saying awesome stuff and also saying this inspires them makes me even prouder :)
[+] [-] wazoox|7 years ago|reply
[+] [-] Corrado|7 years ago|reply
https://www.youtube.com/channel/UC8uT9cgJorJPWu7ITLGo9Ww