Updates

Video chip initial thoughts

One part that is is not so obvious in this project is the video chip. If we would use a video chip from the 8 bit era it would be directly tied to a specific computer aesthetics, like the infamous attribute clash in the Spectrum, the four colors per line on the Atari, or the strange green, gray and brown color palette of the C64.

At the time these computers were designed there were no computers to simulate the circuits, so they had to build prototypes with the real big electronic parts. They built protoboards where the cables connected the whole system and they tested and evolved from there. It was natural that the design stages were planned for several months, even years.

Today that problem doesn’t exist, because the computers available are so powerful that they can easily help design and simulate new chips. So given that there are emulators to simulate old chips, why not create an emulator to simulate a chip that doesn’t exist? With an emulator one can experiment and refine a design before converting it into a real hardware, and this removes the limitation to adapt the project to an existent hardware. If we add that there is technology like FPGA that allows us to implement electronic designs of new hardware using hardware that one can just purchase, the way to start with a software design and end with a hardware device is possible.

Fortunately there is enough information about video chip design, we have the code in the emulators for start and there are some good books about the subject. One book is about the Spectrum’s ULA design, and my friend Leonardo Ruilova recommended me another book about this subject, written by one of the creators of a similar project called XGameStation.

Alternatives to consider

There are several alternatives to solve the video chip issue. Thinking that this is a long term project and there is enough time to experiment, I see the following options:

  • Having an emulated video chip running over a more powerful device like the Raspberry Pi. This will be like any other emulator but allowing perfect emulation because there is no physical counterpart, the only reference would be this new emulator.  In this case the video chip would be software writing over a bitmap that the Pi would display. In the future this could be turned into a real hardware. It would be a strange case where the emulator is written before the new hardware.
  • Using a VGA with an additional video processor.  The VGA chip would be used as a framebuffer / DAC and the video processor would be a custom IC like the custom chips on the amiga or the VDP found in the MSX computers. This chip would have exclusive access to the VRAM and would run at a different speed than the main CPU.
  • Using an existing video chip. In the project by 8-Bit Guy they are using this approach, but there are some restrictions imposed by the existent hardware. For example that chip can draw only tiled graphics (like the NES) and the data transfers between the CPU and the video chip are serial only. I would discard this option for now (*)
  • Using a general purpose chip to generate the video signal. This is similar than using a VGA only that the chip would make the RAMDAC part, creating the video signal by itself. This is a very interesting option and it has been successfully done before, only that for performance reasons it cannot create many colors.

(*) I follow the evolution of the project by 8-Bit Guy and it is very active. Today they published a demo of what can be achieved with their Gameduino video approach and it looks very impressive, but again I feel it goes away from what I want to have, which is to maintain the limitations of the time these computers were created.

Until now, I think that the more flexible way is to create an emulator of the video chip that ends generating an image in a framebuffer. This will allow to have a design in the short term, and once I get more experience on it, it can go to any of these routes: Keep the emulation, handle the framebuffer to a chip plus a VGA or using a general purpose chip for everything.

Update: There is a similar project called Anvil-6502 where they made a video chip that works very well. It is mainly bitmapped and it requires a fast processor, but this may help to convert the framebuffer into a video signal. There are some very spectacular demos.