20 ms·
Show HN: A retro video game console I've been working on in my free time
- kgwxd 8y agoThis 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.
- pkiller 8y agoThanks a lot :) 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. :)
- ArtWomb 8y agoI was a tad skeptical when I saw the title. But it looks like you really pulled it off. It took Atari engineers like 4 years ;) Is it fast enough for multi-input / multi-player?
- pkiller 8y agoThanks :) The only multi-input game I have right now is Tetris for 2 players. My girlfriend doesn't complaint while playing it (except when I win :P), so I'd say it's pretty responsive, even with the somewhat convoluted way the CPU communicates with the PPU and the double-buffering. I think it will work for other types of games as well. With all the hardware, firmware for the 3 microcontrollers, bootloader software, compiler toolchain and tools, I still haven't gotten around to actually make a lot of games for it.
- Eek 8y agoThis is crazy dude! You're an inspiration! Awesome job!
- yonz 8y agoI would totally pay (~$300) to jump on a pre-packaged MOOC like course that has a batch of students working together and the course fee would include the hardware needed and access to a TA like resource (when the batch of students can't solve a problem together). I can even imagine a part II with modern components after learning this level of basics.
- mysterydip 8y agoWow! Thanks for making such an interesting and detailed writeup! And using my favorite CPU too :) Definitely bookmarked to read through more times.
- pkiller 8y agoZ80 rules! Thanks :)
- apple4ever 8y agoI love that there is a group of people who still love the Z80! Such a beautifully designed chip.
- saagarjha 8y agoI was doing a little bit of Z80 work a while back, but I didn't particularly seem to appreciate its design (compared to say MIPS). Why do you think it's beautifully designed?
- Marazan 8y agoYou can hand clock a Z80. There is a certain magic to that.
- saagarjha 8y agoI'm sorry, but what does "hand clocking" a Z80 mean?
- dangerbird2 8y agoI think GP's use of "hand-clocking" to refer to the factthat the z80 can run on a very low clock rate, to the extent that you can have a hand switch that sends individual clock pulses to the processor. This can be useful for testing purposes as well as for low power operation in embedded applications. http://www.thomasloven.com/blog/2013/01/Z80-Tester/ http://www.thomasloven.com/blog/2013/01/Z80-Tester/
- dustindiamond 8y agoAwesome work, dude!
- fxfan 8y ago> I still turn it on sometimes just to check if it really works. I know that feeling ;)
- kgwxd 8y agoJust ordered Make: Electronics and a cheap electronics starter kit with a breadboard and some basic components. Thanks for the inspiration.
- larrywright 8y agoYou should check out Adafruit and Sparkfun as well. They have a lot of solid tutorials to get you started, and a bunch of inexpensive microcontrollers that are easy to get going with, as well as all sorts of lights and sensers and switches to connect to them.
- matthall15 8y ago> I still turn it on sometimes just to check if it really works. I feel this on a personal level, albeit on my much smaller, less complicated projects. Thanks for the amazing write-up, you are an inspiration to us all.
- bredren 8y agoAgreed, this is dank. The successful wiring alone is noteworthy.
- pushpop 8y agoThere 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.
- drfuchs 8y ago“One’s mistakes.”
- stevenjohns 8y agoThis is something I wish I'd be able to do one day, but every time I look into getting into electronics I get overwhelmed. Can you recommend the materials you used when learning? Books or resources etc. This was a really interesting read, thanks for sharing.
- abhishekjha 8y ago+1 from me. I am a lot interested in getting into hands on electronics and most of the times I end up falling a little too short as there is no support around where I live and I never really got a start. Would definitely love some inputs from people who are good at this.
- pkiller 8y agoThanks :) Well nowadays there's a lot of material online, I did find a book interesting, though: "Make: Electronics", it teaches the basics in a very nice way. Aside from that the key, I guess, is to start small and incrementally go for more and more complex stuff going towards things you like (video games, robotics, etc). If you consistently achieve small victories I think it's enough to stay motivated. Everytime I managed to overcome something, I took it as a victory (generating the video signal, getting a program to run on the CPU, etc) and this helped me get to the next problem to solve. I started with discrete logic and an Arduino, went on to programming microncontrollers similar to the one on the Arduino and moved from there to CPUs, RAMs, FPGAs, etc. Also Youtube channels like EEVblog and GreatScott! are great learning resources.
- elliottcarlson 8y agoThere's the xgamestation boards that you put together yourself, that give you a helping hand in the initial steps of building your own retro console: http://www.ic0nstrux.com/products/gaming-systems/game-console-starter-kit#.XIrNyxNKh24 http://www.ic0nstrux.com/products/gaming-systems/game-consol...
- gecko 8y agoHas anyone here actually built one of these? I've eyed this project for forever, but I've always been a bit reticent for whatever reason. I think I'm nervous that either things are sufficiently put-together before I get it that I won't learn, or that they won't have time to go into everything, so it'll just be a soldering-based LEGO.
- pjmlp 8y agoGreat achievement! Muito bom!
- pkiller 8y agoObrigado :)
- anitil 8y agoWow! I was impressed to start with, but then the article and the build kept going, and going, and going .....
- Pharmakon 8y agoThis is so badass! Not only are you a good hacker, but your writing was a pleasure to read. I wish that I could upvote this more than once.
- jstsch 8y agoWow! What an achievement. Putting it all together, including the YM3438 FM chip, great work!
- jespersaron 8y agoRetro gaming in general is about re-enacting the consumption of games, I have never though that you can also re-enact the development/production of them :) Good work!
- madebysquares 8y agoamazing indeed, what a great read, and inspiration to go build something...
- jtraffic 8y agoIf you made a kit and put it on Kickstarter I’d buy one. Just sayin’
- nonamenoslogan 8y agoTHIS kind of project is why I've replaced ./ with HN in my favorites bar. Thanks for sharing, this is an incredibly cool project!
- cristoperb 8y agoIn case you don't know about it, see also: https://hackaday.com/ https://hackaday.com/
- kotrunga 8y agoIf you wrote a book explaining how to do this, teaching the concepts, etc... I think a lot of people (or at least me) would be very interested!!! Great job
- dejaime 8y agoI would definitely buy one. And also buy the companion DIY kit.
- TomAnthony 8y agoYeah, 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.
- pkiller 8y agoThanks :) 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.
- Pharmakon 8y agoJust adding to the chorus saying they’d buy a kit and/or book. For branding, play on your introduction for PGG: Portuguese Guy Gaming. Either way though, you definitely should write more posts if it’s something you’d be interested in, you definitely have an excited and willing audience.
- pkiller 8y agoThanks a lot :). A kit for this console would be crazy though, too many components, too much complexity. But for a smaller version, it could be done. Branding...yeah, I could never get a name for it, til this day I don't know what to call it, I'm terrible with names. Maybe I'll take your suggestion :).
- craked5 8y agoCongrats Sérgio! Such a cool project.
- kregasaurusrex 8y agoThank you for sharing, this is a very cool project!
- snazz 8y agoAs 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.
- pkiller 8y agoI 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 :).
- snazz 8y agoMore power to you for being patient enough to fight through! I’m nowhere near that good.
- pkiller 8y agoI'm really not that special, don't sell yourself short. And thanks :)
- octorian 8y agoI had a few interesting experiences breadboarding for a project of my own, for a 6502-based project. Most notable were: - Being able to detect noise from the system clock crystal oscillator all cross the breadboard (using my oscilloscope) - Seeing certain I/O pins float to a bit too high of a voltage, when they were supposed to be "low", probably due to breadboard capacitance - Accidentally making an AM radio when I forgot to connect a wire on an LM386 I was testing as an audio amplifier Things got a lot cleaner when I went to a PCB, but I did make it all work on breadboards first.
- forinti 8y agoIt'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. Great job, Sérgio. É muito giro.
- pkiller 8y agoI agree (and thanks for calling me a smart individual :) ) Nowadays is so much easier to get information on how to build something apparently very complex. You don't need to go to a library or seek out and go talk to experts, you actually have access to all that through the internet in forums, articles, posts and videos. Also it's easy nowadays to order all the things you need for a project online. Thanks :)
- baroffoos 8y agoAlso the access to a massive library of freely shared code libraries and examples. While working with arduino stuff its amazing how when I buy some random part off ebay I can find someone who has already spent a week writing a library that makes everything super easy to use. If I had to do it all myself this would take forever.
- krmboya 8y agoInteresting perspective. I wonder what kinds of projects a motivated individual would be able to tackle say, 20-30 years from now.
- japanoise 8y agoThis is super cool. Do you have plans to make the emulator public? If so I'd be very interested in developing software for the console.
- Yhippa 8y agoI 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.
- pkiller 8y agoThanks :) (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. And thanks again for the comment :)
- moftz 8y agoYou could use a Zynq FPGA that has a built-in dual core ARM processor. It has 512K of L2 cache and 256K of memory, more than enough to basically copy the same architecture into that design. It also has ADCs built in so you can implement analog joysticks too. It's also probably fast enough to build a graphics processor in logic. Only thing you may want to keep is the sound processor because there is no built-in DAC so you would need to implement that anyway.
- ertoiuert 8y agoPort it to MiSTer?
- onatm 8y agoGreat work! I wondered what resource you have used when you started learning electronics. I'd be really appreciated if you share them
- pkiller 8y agoLike I wrote in another comment. There's a great book called "Make: Electronics". And you can get started with an Arduino kit, it comes with a book and several components. After this when you feel comfortable, you can move one to more advanced stuff, depending on what you're interested in. There are plenty of videos online for almost any topic in electronics, and projects online using all kinds of components and for all kinds of purposes. Check out EEVblog, the forums are good, and there are some videos for beginners and also the Youtube channel GreatScott!. And thanks :)
- onatm 8y agoThank you for your reply!
- tmountain 8y agoThis 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!
- NikkiA 8y agoI'm surprised you didn't implement a simple 8k bank switching scheme to utilise the rest of the 128K chip, it's really just a handful of 74244 buffers and a 74138 decoder stuck on an IO port.
- pkiller 8y agoI thought about it, I really did, however, I really felt I didn't need the extra RAM, especially for the kinds of programs and games I was aiming for. And in this case "a handful of 74244" is a lot more complexity and it got a to a point where I really wanted to minimize the amount of ICs I used. Also I was felt bank switching added complexity when developing for it. This way I can write a C program have it access data and I don't have to worry about the code being split in more than one bank or having the data be in a different bank than the code, etc. It's a nice catch though, thanks for the comment.
- lancesells 8y agoMuito bom! I'm not sure I understood more than 10% of this but I love the concept and the determination to follow through on it.
- melbourne_mat 8y agoThis is outstanding work. You should feel proud that you created something this complex from scratch over a number of years and did not give up! I'm in awe
- osrec 8y agoYou'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!
- cdnsteve 8y agoGreat project and kudos to you for seeing it through to completion. In our spare moments this is often the greatest challenge. I read the whole blog post, really cool to see the architecture diagram, would love to see more.
- sexy_seedbox 8y agoNow pour coffee over the console! (surprised by the lack of Bandersnatch jokes) Great job on this!
- geowwy 8y agoIf you're interested in this you might be interested in 8-bit Guy's new computer: https://www.youtube.com/watch?v=ayh0qebfD2g https://www.youtube.com/watch?v=ayh0qebfD2g
- 83457 8y agoYeah, his project was the first thing that came to mind when I saw this.
- apple4ever 8y agoThis is so freaking cool!! I’ve been dreaming of building a Z80 computer for literally 20 years. I think you inspired me to stop dreaming and start doing.
- mettamage 8y agoThis is such a clool project. I would be really curious for: A porting guide An fpga tutorial
- sehugg 8y agoNice job! Are you going to do more designs in the future? Maybe Verilog/VHDL based?
- pkiller 8y agoThanks :) Yeah, I already have another ongoing project based on a cheap FPGA board with a Cyclone II (quite old but it does the job), the idea is to keep it cheaper and much less complex. The FPGA has a Z80 implementation, video, sound and handle the game controllers. An external Atmega328 is used to handle the SD Card and then just RAM, an ICs for composite video and an op-amp. I also have some ideas for a better console, maybe a generation forward and an 8-bit computer, but...these are just ideas, I doubt I'll actually get around to do them.
- zokier 8y agoHave you seen Project IceStorm? I don't know if ICE40 FPGAs would be good fit here, but they could definitely be more hobbyist friendly. http://www.clifford.at/icestorm/ http://www.clifford.at/icestorm/
- sehugg 8y agoI've found it pretty easy to use the IceStorm toolchain. You can do everything from the command line without a funky proprietary IDE.
- niedzielski 8y agoI also made a Cyclone II FPGA implementation :] It looked like this and supported very primitive line rendering: https://github.com/niedzielski/swankmania/blob/master/DSC05786.jpg https://github.com/niedzielski/swankmania/blob/master/DSC057... https://github.com/niedzielski/swankmania/blob/master/DSC05763.jpg https://github.com/niedzielski/swankmania/blob/master/DSC057... https://github.com/niedzielski/swankmania/blob/master/DSC05751.jpg https://github.com/niedzielski/swankmania/blob/master/DSC057... Unfortunately, the physical hardware and later the code were both stolen in separate incidents. I was able to recover some version of the latter I had shared with a peer. It's posted in the same repo but probably not worth reviewing as it's from my college days and a total mess.
- undershirt 8y agosimilar project from december (using an oscilloscope) https://mitxela.com/projects/console https://mitxela.com/projects/console
- newnewpdro 8y agoVery cool project, I just wish the images on the website weren't many megabytes a piece. They can't even all load on my slow internet connection without timing out. It's unfortunate how often people share files directly from their camera without first compressing and resizing them appropriately these days.
- pkiller 8y agoThanks :) And yeah you're right...my bad... (EDIT) It should be a bit better now, thanks for the warning
- netvarun 8y agoAwesome work! Here’s a similar project (done using an fpga) I saw on github: https://fotino.me/consolite-fpga/ https://fotino.me/consolite-fpga/
- deleted 8y ago[deleted]
- system2 8y agoI can't remember the video post, but something similar was here few years ago and the guy decided to make a video series for the project. Can you do the same for a new project from start to finish?
- maharsh007 8y agoWow is that like creating a separate shell for running the games.
- bpye 8y agoThis is something I have set out to begin (or similar) and ended up giving up on, multiple times. Maybe this will motivate me to finally pull something off! This is awesome work, as someone else mentioned, I would totally buy the book.
- albf 8y agook, this is the most awesome hacker news of the year so far. Really interesting, nice to see that you were able to make it work. Sometimes I talk to people about some ideas and they say "too dificult, find a simpler project". Sending your post to these lazy devs.
- bitwize 8y agoThis is so awesome, a righteous hack built from chips up. Just what we need more of on a site called Hackernews.
- Accacin 8y agoVery impressed and you come across as such a nice person too! All the best to you.
- pkiller 8y ago(I'm actually secretly a horrible person :P) Thanks for the comment :)
- chrisledet 8y agoThanks for sharing. This looks awesome! Post likes this are the reason I follow Hacker News.
- hyro010 8y agoI think this should give everyone the motivation to continue working on side projects till they are finished.
- Bitter_Function 8y agoOne word, awesome.
- m1nes 8y agoThis is fantastic
- 2sk21 8y agoI'm really impressed - what a great project!
- awalvie 8y agoYou sir, are awesome.
- bizzle1 8y agoadsd <br> bdd cdd
- rkachowski 8y agoThis is both amazing and terrifying. 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.
- bookofjoe 8y agoI hope Woz sees this and says a word or three here.
- pkiller 8y agoWozniak is a legend and this no where near the quality of his work. The way he designed the Apple II was just amazing. Thanks for the comment :)
- bookofjoe 8y agoNevertheless, I just emailed and tweeted him the link. You never know with Woz.... About 10 years ago, I posted a link about him on my blog. In it I wrote that he wasn't much of an athlete in HS. Within a couple hours he posted a comment correcting me, noting that he was a varsity pole vaulter on the Homestead High School track and field team. OMG
- raverbashing 8y agoAs someone who grew up using an Z80 powered MSX, this brings back a lot of memories. It's amazing how "accessories" can make even an 8-bit processor go far Projeto fixe demais!
- bussiere 8y agoAmazing work :) It's very passionating to read also.
- Rooster61 8y agoThis 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.
- bantunes 8y agoIt's almost like Portuguese people are not a uniform block, right?
- Rooster61 8y agoWho said anything about Portuguese people as a uniform block? That doesn't even make any sense as it's not only Portuguese people that speak Portuguese lol. I only referenced those who have either chosen or were involuntarily exposed to English as a second language who speak Portuguese natively.
- bantunes 8y ago> and their English mistakes are pretty uniform due to the specific differences between the languages, esp regarding prepositions and tense This is not the case. Different people make different mistakes, as any exposure to a high-school level English class will allow you to discover. There's a case for clusters of similar errors, but then again any generalizing statement is true for a sufficiently high level of clustering.
- Rooster61 8y ago"Their" referring to the group of Portuguese speakers that I know, not Portuguese people as a block. That implication came about due to you alone. The observation that you quoted is based on both my interaction with them, but also their interpretation and observation of themselves relayed to me in conversation(many of them are in the field of linguistics, so this type of thing comes up a good bit). I can see how you could draw that conclusion from my post, however. I assure you there was no intent to generalize.
- ChicagoBoy11 8y agoThis 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!
- osrec 8y agoYou 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.
- eldavojohn 8y agoI 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.
- pkiller 8y agoThank you so much :) 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. :)
- martin1b 8y agoVery impressive. My first thought is, why? Just use a Pi with Retro-pi. However, you wanted to be down at the metal. That's quite a challenge, particularly when you work alone. I'm always impressed when someone is skilled at both hardware and software to make a finished product. It's Woz-like. Very impressive work.
- rafaelvasco 8y agoBecause the journey is more important than the destination.
- pkiller 8y agoYes the journey was very important, absolutely. Also I had set myself a specific set of goals that obviously are not going to make sense to most people and I understand that. It could seem like a daunting task at first, but breaking it into milestones actually makes it easier and makes the journey a lot better.
- nkrisc 8y agoThe same reason people run a marathon instead of just driving the route.
- growlist 8y agoI love these posts of new retro consoles. I would love to see one that maintains the audio-visual aesthetics i.e. FM chip tunes, sprite-based 2D graphics yet otherwise pushes the hardware to the absolute max of what is possible today. I think the zenith of 2D gaming was consoles like Neo-Geo and Sega Saturn (and possibly a 2D arcade board whose name escapes me?) and I'm thinking of something along those lines. Does such a thing exist?
- hawkingrip 8y agoAwesome
- slackfan 8y agoIt's not really "retro" if you've been building it in $current-year. /pedant
- Retra 8y agoRetro doesn't mean "old." It is a style.
- wazoox 8y agoYou should talk to the 8bits guy, he's on the process of creating his own dream 8 bits machine, and it looks like you've beaten him :)
- Corrado 8y agoI 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. https://www.youtube.com/channel/UC8uT9cgJorJPWu7ITLGo9Ww https://www.youtube.com/channel/UC8uT9cgJorJPWu7ITLGo9Ww
- JabavuAdams 8y agoShine 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?
- drinfinity 8y agoAmazing how the world keeps going even when you're not paying attention huh?
- JabavuAdams 8y agoIt's like other people are real, or something.
- bradenb 8y agoI was expecting to see an article about yet another retro pi but I’m seriously impressed by this. Not only is the hardware really cool but your tooling and software setup is equally impressive. Great job.
- nukeop 8y agoWay more impressive than various fantasy consoles that typically involve a lua programming environment and an artificially limited screen. Here the limitations actually stem from the hardware being used. This is something that only huge companies could attempt to design not that long ago. I once made a virtual machine for a console designed from scratch as "fantasy hardware", with its own architecture, assembly language, CPU, and so on. I'd like to be able to bring it to life some day as you have.
- cmaltby 8y agoThis is absolutely amazing, well done!
- airstrike 8y ago:O Incrível e inspirador! Thanks for sharing this and congratulations for this amazing accomplishment!
- jahabrewer 8y agoI've considered trying a project like this in the past. You've given me a little inspiration to go do it! Great read!
- x11 8y agoThis is awesome. Congratulations. Have you considered turning this into a book, or a MOOC, or something you could sell? Many people would be interested.
- korethr 8y agoOkay, this is cool as hell. 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 8y agoThank you :) 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 :).
- ty_2k 8y agoIt finally happened. I had to sign up for Hacker News just to give props. Very cool and inspiring project. Thanks so much for posting.
- ai_ia 8y agoWow. This is incredible. Bookmarked and will be a lot interested if you could do a series of blog post, man. This is amazing.
- pkiller 8y agoThanks :) I'm gonna try and keep posting.
- filmgirlcw 8y agoThis is incredible! Thank you for posting and outlining all your work! As a fellow 80s/90s kid, this is extremely my shit.
- filmgirlcw 8y agoFollow-up — you’ve inspired a colleague and I to do something similar! I read this, iMessaged her the link and said “we have to do this” (she has significant hardware experience. I do not.) and she’s in total agreement! So thank you again b/c this is legit inspiring and exciting!
- steve_avery 8y agoI 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 :)
- iheartpotatoes 8y agoOh 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!
- pkiller 8y agoThank you :) 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.
- iheartpotatoes 8y agoNote I put "easy" in quotes because your project was by no means "easy", especially with no tools at your disposal but the internet! Can I ask how you incrementally tested the video circuit as you built it? Did you have a test pattern generator or something? I know very little about TV signals, I spent some time trying to wire up an analog camera and just ragequit because I lacked a good fundamental debug process.
- pkiller 8y agoI knew what you meant by "easy" and I agree. Well, I think it isn't that hard to get an analog video signal going. Having a TV that took an RGB analog signal, meant that I could connect the microcontroller directly to the TV (using resistors to convert the voltage and for the color DAC). Then all I did was get the timing right, especially with the sync signal. Along with other resources, I used this image ( http://martin.hinner.info/vga/pal_tv_diagram_non_interlace.jpg http://martin.hinner.info/vga/pal_tv_diagram_non_interlace.j... ) to understand when to set the Sync signal to 0 or to 1. When using a microcontroller you can use interrupts or you can have well-timed instructions to set the sync signal on or off at the correct time, I chose the latter. The micros I used are AVR 8-bit architecture based, so most instructions always take 1 cycle, others take from 2 to 4 cycles to execute, simply by looking up in the manual I could calculate when certain instructions would execute and build a program in assembly that would generate the sync signal successfully. And if everything was right, my TV picture would switch to black, meaning it detected a valid PAL signal. Of course, it wasn't always this easy, for example, I had a bug when I started, I wasn't setting one of the registers correctly and it took me a day to solve it, I had to look at the code over and over until I figured out what was wrong. Not having an oscilloscope nor a logic analyzer certainly made it harder. Another lucky thing for me, was that the TV I have (an old CRT TV) is actually quite forgiving and even if I don't feed the timings exactly, it will still show a picture, so that helped. Once I had a valid signal going I tested sending pixels to the screen, and I did use patterns to see if I had the timing right for each pixel, if I took too long switching pixels they would get wide. So I tried some checker patterns and stuff like that, but nothing fancy. I hope this answers your question. It really isn't that difficult to generate a video signal and also I was quite lucky to get it working early on. I probably didn't do things like they should be done, but it worked for me. I would say that best thing is have a logic analyzer or oscilloscope to check if the signal you're generating corresponds to what it should be, that makes it a lot easier.
- bookofjoe 8y agoThis post makes the failure of micropayments poignant: if one-click payments were possible, its creator would be enjoying a unexpected inflow of cash. Real soon now, like cold fusion.
- J_cst 8y agoI would like to express my deep admiration and esteem for you. The tenacity, competence and intelligence that your project demonstrates is what this planet needs. You are a great hacker and you have all my admiration.
- convivialdingo 8y agoJust awesome!!! I built a 68k machine (no video, just CPU, Serial I/O, RAM/ROM) in high school and it was really nostalgic to see your incredible and awesome project! Congrats on such an awesome build!!!
- lewiscollard 8y agoAt 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.
- pkiller 8y agoThanks for the comment :) 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 :)
- vkaku 8y agoCool hack! I'd like more details about how you removed the wires (custom board or otherwise) or got the IC equivalents. Ideally I'd like to see as few dangling wires when making something like this, because I have fat finger syndrome. :) I prefer joint wires with headers in them (like ATA cables) but that's just me.
- ultrasounder 8y agoThis is awesome inspiring. All from discrete ICs and fully hand optimised. You could always make it into a kit and do a Kickstarter though.
- terrycody 8y agodude, this is not a human, not belong to our universe, sollute
- Razengan 8y agoLemme hijack this opportunity to request someone to make the console I have always fantasized about, as a gamer and a developer: • TL;DR: Basically an iPad with detachable controllers and open-source OS, SDK, app store and sideloading. OR: Basically a Switch with fewer OS limitations, sideloading and lower barriers to development and publishing. • Nintendo Switch form factor. • Capable of connecting to external displays and using wireless controllers, mice and keyboards. • A semi-multitasking OS, where only one app has screen focus but you can have messaging etc. apps in the background, notification overlays and use a web browser at any time. (I'm mostly thinking of the dear old PS Vita here.) • A single, centralized app store while still allowing users to run apps downloaded from anywhere else. • An SDK that lets you write games in the language of your choice (but if we had to choose: Swift, please.)
- indigo945 8y agoThis is very cool. Doing this all on your own, especially since you're not a computer engineering professional, is astonishing. The one thing that irks me about the console design is the amount of RAM it needs. In the age where 8-bit consoles were actually being built, RAM was the most expensive part of the devices by a far margin. It is no accident that the Atari 2600, for example, only had 256 bytes of main memory, and even the very popular NES/Famicom ran on only 2kB of main memory. This "retro" design, by contrast, employs a lot of RAM chips in a variety of places, even where they are not actually needed: the CPU and PPU can be connected with different technologies (as the article hints at), and double buffering via a second VRAM chip is the kind of feature that classical home consoles would never do due to cost reasons. Don't get me wrong though, it's still an amazing project!
- pkiller 8y agoYeah I did put more memory than the old school consoles had, absolutely, however the RAM in those days was only used for data mostly because they also had the cartridge ROM (or ROMs) to store the code. In my case I need to load the code to RAM, so I would always need a larger RAM. But yeah, they also had less colors to work with and palettes (which were costier to implement in a software renderer). And this CPU is also faster than of those consoles. I did give myself a more confortable system in terms of RAM and computational power. But my aim was for a machine that would sit somewhere between the 3rd and 4th generation. The double buffering I understand as well, if I was working with an FPGA I would not have gone with frame buffers, for sure, but that was the solution I found at the time using the components I was using and it worked. The attention this has gotten, especially here in HN is still a bit unbelievable to me (and amazing of course). I don't want people to think this is an optimal console design or anything. This is by no means a perfect project or "the way to go" in terms of homebrew video game consoles, it's just the way I found to do one while learning electronics along the way. And thanks :)
- alfanhui 8y agoAll those wires! You should checkout dirtypcb.com to get yourself a cheap pcb for your boards, that will make the it very special and longer lasting for you. Designing PCB with eagle on mac or kicad on linux are great software to design PCBs.
- jason0597 8y agoThis is a brilliant project. I've toyed around with electronics and microcontrollers and I once wanted to build a full "desktop" PC with an STM32 and a PS/2 keyboard input and a VGA output. Unfortunately, school took over me and I left it. One thing that I am curious about though is whether you could use such a big project as yours for employment. E.g. if you had absolutely no formal qualifications and applied to a (relevant) company by using such projects in your CV, would they consider you?
- pkiller 8y agoFirst of all thanks :) And if you do find some time that project seems really cool, I never really got to work with the STM32 micros, but they are really powerful and cool. Answering your question, well, even thought this is an electronics engineering project, I don't feel qualified to work with electronics professionally, for example, there's a lot of knowledge I lack. I do work as a software engineer and I have done a couple of interviews myself to hire people and I do believe this helps when applying to a job, I'm not saying it completely replaces your qualifications but it might at least give you an edge. I'm seeing this as someone who would want to hire someone skillful. A technical project certainly is on the very least a nice thing to have in a CV. Of course this is just my opinion. And if you are feeling like applying for a job based on your projects, just give it a go. One advice I can give is: if you do have projects of your own, big or small, don't do it like me and keep them to yourself for years :P. I really had no idea so many people would appreciate my pet project.
- brainpool 8y agoFantastic and really inspiring, with a great presentation and narrative to boot! I am impressed and a bit thrilled :)
- scrumbledober 8y agoThis is so far above my head that I really don't have anything to add to the discussion that hasn't been said by people who know a lot more about this stuff but I really just have to say this is insanely cool and inspiring.
- mito88 8y agobeautiful project. how does one obtain a z80 if it's not manufactured anymore?
- pkiller 8y agoThanks :) Actually they are still being manufactured to this day, that's one thing I didn't mention in the blog post is that you can get a brand new Zilog Z80 today, the 6502 (the CMOS version, 65C02) is also available. You can probably get them from all the major electronic components stores (Digikey, Mouser, etc).
- cronix 8y agoThis is so very cool. It really took me back to the late 70's when I was a kid and my dad built a "computer" that took up an entire 4'x6' workbench. We played lunar lander on it, but I never knew what we were doing because it was just a numerical LED display. It looked very similar. Just breadboards of modules connected by hundreds of wires. One day, my little brother was playing in the garage where the "computer" was, and discovered the wire cutters... 2 years of work gone in a few minutes. Yes, he's still alive. How, I don't really know lol. Epoxy that thing!
- blemasle 8y agoI'm myself a self taught electronic hobbyist who followed the same path you did I guess (eevblog and such). I'm nowhere that good at the moment and you sir are an inspiration to what can be achieved with dedication ! Thank you for making such a project and for putting it online for the world to see. Your friends were right ;) If you haven't already you should definitely add your project to hackaday.io (the community driven part of hackaday).
- kriro 8y ago"""Even though I had no experience, I said to myself “why not?”, bought a few books, a few electronics kits and started to learn what I felt I needed to learn. """ Would you mind sharing what books (and kits) you decided to buy? I'd like to work on my electronics a bit as well :)
- pkiller 8y agoLike I've said in a few other comments (I've been trying to answer some of the comments, everyone has been really nice and really interested), one book that got me started was "Make: Electronics", I believe there's a second one now, I really like how the book explains the very basics in a pratical way. Other than that there's a lot of info online nowadays. EEVblog aside from the forums has a nice youtube channel with videos with topics that range from beginner to advanced, GreatScott! is another one that explains things really well. Ben Eater has also a very interesting channel. Also check other people's projects similar to things you would like to make. As for kits, I started with the Arduino starter kit, it comes with a project book and a few varied components, after that I started buying components locally or from major international component shops and going towards the things that interested me the most in electronics. I hope this helps :).
- stonecharioteer 8y agoOh wow! This is so cool!
- yonz 8y agoEPIC!
- narven 8y agoAwesome work. Parabens
- tracker1 8y agoThis is incredibly cool... I've thought about playing with some of the software emulators, but wouldn't have even thought to tinker with replicating or creating with real hardware.