Comment by korethr

8 years ago

Okay, 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.

Thank 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 :).