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. And thanks again for the comment :)
You 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.
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.
Who 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.
> 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.
I can see how that remark could have felt bad, but there are plenty of opportunities not to take it that way. This is why we have a site guideline that asks all of us to "Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith."
Thank you, if it's something you like, you should try a hardware project, for sure :)
And yes I am Portuguese, born and raised and I do know what you mean, there are mistakes that are somewhat common for Portuguese speaking English and I do make an effort not to make the same mistakes. However I know my English is far form perfect and it's always easier when it's in written form.
I think that the fact that I've always spent too much time watching american/british movies and TV shows made me pay more attention to how English should be spoken :). But anyway, thank you for saying I speak perfect English, it's actually a great compliment. :)
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. Great job, Sérgio. É muito giro.
I 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 :)
Also 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.
Interestingly enough, looking at the HW, there is not much there that wouldn't have been feasible for hobbyist a decade ago. But of course the community and information has absolutely exploded during that period
Comments (210) 92 threads
Earlier commentsI'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'm going to read this a few more times. It's like reading a good book about my hopes and dreams.
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 :)
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.
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.
Continue this thread — 3 replies
https://news.ycombinator.com/newsguidelines.html
And yes I am Portuguese, born and raised and I do know what you mean, there are mistakes that are somewhat common for Portuguese speaking English and I do make an effort not to make the same mistakes. However I know my English is far form perfect and it's always easier when it's in written form. I think that the fact that I've always spent too much time watching american/british movies and TV shows made me pay more attention to how English should be spoken :).
But anyway, thank you for saying I speak perfect English, it's actually a great compliment. :)
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.
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 :)
All comments shown.
Couldn't load more comments. Check your connection and try again.