I always desired to build my own 8-bits computers. Back in the '80s I was a Commodore 16 user, and a lot of friends of mine had C64 and MSX computers. They had sprites and sound, I only had 121 colors. Now I want to build my own system, to bridge that gap.
I looked around, started studying projects of other homebrew enthusiasts and eventually made my choices. So, I first designing my own computer that lead to the following specs:
- CPU: I chose a Zilog Z80 because it has a lot of registers, it has I/O features, it can set the stack anywhere into the RAM, it can handle interrupts in different ways.
- RAM: 32KB of SRAM. I think that, at the moment, this amount of memory is enough to do some good programming.
- ROM: 32 KB of EEPROM. I chose an EEPROM chip because I can easily burn my firmware with an Arduino board connected to my computer. Also, 32KB are enough to store a BASIC interpreter and some other stuff.
- VIDEO: TMS9918A. I wanted a video chip that was able to render a colorful image, with a good image size, easy to interface and that had support for hardware sprites.
- AUDIO: AY-3-8910 (or its variant from Yamaha, the YM219F). It features 3 voices with environment and white noise. It also has 2 input/output ports, that were used to read the keyboard or the joystick ports.
- parallel I/O: a Z80 PIO that, at the moment, only drives some LEDs
- serial I/O: a Z80 SIO/0, used to interface with a computer through a serial connection (FT232 serial/USB converter)
- timer/counter: a Z80 CTC used to generate the serial clock and to increment a software timer counter
Why did I choose the Z80? Initially, I chose the Motorola 6809, then the 6502 but both of them had PROs and CONs. The 6502 has very few registers and it doens't support I/O instructions so every peripheral chip must be mapped into RAM, leading to complex address decoding systems. The 6809 is similar to the 6502 but it has some more registers, it has I/O instructions and a lot of addressing modes but it wasn't very used at its time so there aren't a lot of resources available. So I decided to use the Z80, because it's still manufactured by Zilog, it has a lot of peripheral chips specifically made for it (so that it's easy to interface each other), it can use I/O ports, it has a lot of registers, and so on.
The RAM and ROM are at the moment of 32 KB each: I think that this is a good amount of space, both for user programs and for firmware too. Maybe in the future I could implement a system to deactivate the system ROM and add another 32KB SRAM chip, to let the user to load very big programs (the same thing was done by engineers for the C64, where the ROM could be disabled, showing up the underlying RAM).
Video section. I only had few options. I discarded the MOS VIC-II from Commodore because it's very expensive online and it was developed to work with a 65xx processor. I also discarder the 6845 because it was just a video signal generator. I also discarded solutions based on moderm microcontrollers: I could have used an Atmel MCU and program it to geneate a VGA signal but I wanted to use only solutions that were available at that time. So I chose the TMS9918A, that is still available on Ebay at a resonable price, it's easy to interface since it only needs few lines between the CPU and itself and since it can generate an image of 256x192 pixels with 15 colors and 32 sprites.
For the audio section the choise was easy, the AY-3-8910: widely available, easy to interface, good to use as an I/O periphery too, and cheap. There is also the YM2149F: this is (almost) the same chip manufactured by Yamaha under license by GI. So that I could choose the one I was able to find first.
The I/O is the reachest part of the computer. Since Zilog made a lot of peripheral chips and since all of these chips are still in production, you can find parallel & serial interfaces very easily. I decided to add a Z80 PIO (Parallel Input/Output) to drive 8 LEDs via an ULM2803,...Read more »