
My Homebrew Z80 Microcomputer - XtalJ
http://calculon80.j89.se
======
kqr2
_Build Your Own Z80 Computer_ by Steve Ciarcia of Byte Magazine and Circuit
Cellar fame may also be useful :

[https://smile.amazon.com/Build-Your-
Own-Z80-Computer/dp/0070...](https://smile.amazon.com/Build-Your-
Own-Z80-Computer/dp/0070109621/)

~~~
analog31
While not a how-to guide, the Z80 book by William Barden and published by
Howard Sams, has been placed online. I believe the same book was printed and
sold by Radio Shack.

I read that book after Don Lancaster's TTL Cookbook, also published by Howard
Sams. That was around 1981, while I was in high school, and I had practically
no electronics knowledge before that. Those books were extremely clearly
written, and even today provide the foundation of my knowledge of
microprocessors and digital logic. I never actually built or programmed a Z80
machine, but the basic knowledge was readily applicable to 6502 and 8088
hardware and software, and even to today's microcontrollers.

Because of the relative simplicity of those systems, I think they are still a
good place for anybody to start. Those articles by Steve Ciarcia too. What a
genius, at making the microcomputer revolution accessible to hobbyists.

I loaned those books to my best friend, who vanished with them when his family
became missionaries, but I don't think he did it out of malice. I'm glad that
I can find them online today, just to take me back to those exciting years.

~~~
XtalJ
Agree, I have the Z-80 Handbook by William Barden, and it is really well
written and contains a lot of information without being a tutorial :)

------
ddon
Recently found Z80 video of how a guy makes ZX Spectrum computer from ground
up, fixes bugs and problems as he proceeds. Video is in Russian, but still
amazing even if you don't understand it!

[https://www.youtube.com/watch?v=8rWCYo1UcOQ](https://www.youtube.com/watch?v=8rWCYo1UcOQ)

~~~
XtalJ
Nice, I'm thinking about making it possible to connect it directly to a
display/TV and keyboard. Now, I have to have a terminal or laptop + terminal
emulator.

~~~
jdmoreira
It seems hard to drive a vga display without resorting to fpgas or an avr.

If composite is enough, the NES PPU could be a fun addition to that design :)

~~~
Rhinobird
Apparently, it can be done with a bunch of TTL logic chips.

[http://forum.6502.org/viewtopic.php?f=4&t=3329](http://forum.6502.org/viewtopic.php?f=4&t=3329)

------
mjard
Another z80 kit:
[https://www.tindie.com/products/Semachthemonkey/rc2014-homeb...](https://www.tindie.com/products/Semachthemonkey/rc2014-homebrew-z80-computer-
kit/)

2014RC Computerphile video:
[https://www.youtube.com/watch?v=lU2NKHJygD8](https://www.youtube.com/watch?v=lU2NKHJygD8)

~~~
Gracana
I built an RC2014 and I really like it. I'm using some of Dr. Scott M Baker's
boards (WD37C65 floppy controller and 512k banked RAM/ROM) so I can run CP/M.
I'd like to get things set up so I can build CP/M on the RC2014, but for now
I'm just starting to learn the tools.

I have a Wyse-55 terminal acting as a display with some ACIA board
modifications to allow hardware flow control so it doesn't get overrun. I also
have a VFD that'll do 40x15 characters or so, which is narrow for a CP/M
system, but I should be able to modify the few programs that'll really make a
mess on a narrow screen.

I've got a bunch of pictures on twitter if anyone is interested:
[https://twitter.com/FeatherOrNot/media](https://twitter.com/FeatherOrNot/media)

------
steaktartaar_
Z80 micros are a lot of fun. I was looking for a kit last year and ended up
building this one:

[http://cpuville.com/Z80_kit.html](http://cpuville.com/Z80_kit.html)

Getting it to work and writing simple programs is really satisfying and
totally worth the burns from learning how to solder.

~~~
XtalJ
Yes, the programming is the fun part so if you don't want to design a new
computer from ground up, a kit or a complete computer is to recommend :-)

------
mindcrime
I love this. I started on a project to do a homebrew Z80 machine late last
year as well. I haven't made much progress yet, but I'm really champing at the
bit (no pun intended) to get this going. Reading stories like this is really
motivational! And it's always good to learn from those who went before...

~~~
XtalJ
It is a really fun project to do, so I think you should continue :-) I'm going
to add more documentation on the website, like timing diagrams etc. that may
be useful for other people building a Z80 computer.

~~~
mindcrime
_It is a really fun project to do, so I think you should continue :-)_

Oh I will. Things just got bogged down over the holidays and everything late
last year. My next step is to get everything setup so I can program an EEPROM
with my Arduino so I'll have a way to load a program to bootstrap the system.
I'm intentionally doing things the hard way though, to maximize my learning.
For example, I'm using an Arduino Uno which doesn't have enough digital output
pins to represent both the address bus and the data bus for the EEPROM. So
instead of just grabbing a Mega out of the parts box, I am using SIPO shift
registers to setup a serial -> parallel bus so I can program the EEPROM with
fewer wires from the Arduino. No, it isn't efficient, but it'll teach me to
use shift registers.

One of my other "next steps" is to just breadboard that Z80 "test circuit" and
see if I can get some LED's to blink. I have to get the clock stuff figured
out as well...

Like you said, it's a lot of fun. :-)

~~~
XtalJ
Sound like you have the right mindset ;-) The most boring part of the project
was routing of all the bus lines in KiCad, but I knew that if a kept on
working, the reward would be big :-)

I was actually planning to do a ROM emulator with a PIC MCU at first, but
ended up using a regular EPROM, SIO/UART and a bootloader to load programs via
RS232. When I had a stable program, I burned it to the ROM and continued. This
is because when I got started with the "test circuit" I didn't want to go back
to the PIC :-D

I'm currently developing my ROM monitor so that I can get CP/M running :-)

------
znpy
Quick note: if you want a full-hardware "computer" (screen, keys, cup and I/O
stuff) consider buying an old Texas Instruments calculator: models up to Ti86
have a Zilog Z80-similar (ISA-compatible) inside, the TI89 and later have a
Motorola 68000 cpu inside.

The Ti86/Ti89 are programmable in both Assembly and BASIC (interpreter on-
rom). If you are willing to buy the data cable and fiddle with SDCC (Small-
devices C compiler, a "mod" of gcc) you might program them in C as well.

Links:

* Ti86: [https://en.wikipedia.org/wiki/TI-86](https://en.wikipedia.org/wiki/TI-86)

* Ti89: [https://en.wikipedia.org/wiki/TI-89_series](https://en.wikipedia.org/wiki/TI-89_series)

* SDCC: [http://sdcc.sourceforge.net/](http://sdcc.sourceforge.net/)

~~~
XtalJ
I actually own a Ti-82, but I have never programmed it :-)

~~~
znpy
You can program it without any hardware. There is an intepreter and an "ide"
on-board, look for the PRGM key.

Also, I saw there is an "ASM" command, but I didn't check if it can assemble
stuff or anything.

~~~
XtalJ
Sounds great :-) Only problem is the "not-so-great" keyboard :-/

------
prashnts
It looks awesome. I'm looking forward for your documentation.

Is the PCB multi-layered, or two layers? Could you also comment which software
did you use to design it? I've used Eagle CAD quite a lot in past and it works
great, though I always wished to use KiCAD because it's open source. Thank
you!

~~~
XtalJ
Thank you, I will write and publish much more documentation as soon as
possible :-) It is a four layer PCB, one for Vcc, one for ground and the other
two for signals. I designed it in KiCad and ordered it from PCBWay.com.

I will also upload the schematic etc. if anyone wants to have a look or create
one their self. However, if anyone wants to build it, it may be a bit
expensive due to the high IC count.

~~~
woodrowbarlow
would you be willing to share a pricetag?

~~~
XtalJ
Yes :-)

Five PCBs cost me $250, but they can be made cheaper. Otherwise the price
depends a lot on the components. Ceramic ones are very expensive and the whole
computer would probably end up at around $300 - $400. For plastic components,
the price would be more close to $200.

------
FullyFunctional
That is awesome. Coincidentally, I've been spending my weekend revisiting my
Z-80 based Nascom 2 (see
[http://nascomhomepage.com/](http://nascomhomepage.com/)) and playing with
Turbo Pascal's great grandfather, BLS Pascal. Even now, ~ 35 years later, I
still think good code generation on the Z-80 is a significant challenge and
wonder what else could have been done with the transistor budget and
technology constraints of the time.

Good times

~~~
XtalJ
I have not heard of BLS Pascal, but it is possible to run Turbo Pascal
(version 3, I think) on CP/M, which I intend to do when I have the OS in place
:-)

~~~
FullyFunctional
The original CP/M version was called Compass Pascal (and might have been Poly
Pascal also). Under Borland it was renamed (and expanded?) as Turbo Pascal.

------
mysterydip
I've been wanting to do a project like this for a while. Specifically, wanting
to write a basic program to visualize ALDL data from my 88 fiero on an 8 or 16
bit homebrew mini system, for extra retro goodness. Ideally I want a keyboard
and serial port, a vga out, and a spot for a cf or sd card. Maybe running cp/m
or similar. I've looked at rc2014 and similar and even some fpga options, but
haven't settled on the right starting point yet. Ideas?

~~~
XtalJ
The easiest way is probably to buy an old computer from the eighties, but they
can be very expensive :0 I don't know much about other homebrew computers, but
mine (Calculon/80) could probably be expanded with those things. I haven't
tested the expansion port yet, but I will when have some time :-) Also, if it
does not have to be using the Z80 CPU, I would recommend the Motorola 68000
CPU, which I will use in my next project.

~~~
mysterydip
I'll check out the 68000 stuff. I've mostly been looking at z80 and 6502 at
this point, so maybe that's the key to a wider world.

I enjoyed reading about the Calculon/80 and look forward to seeing your next
project.

~~~
XtalJ
Thank you :-)

I think that the 68k will be more fun to write OS and other software for as it
is 32-bit, has memory protection, and can run UNIX :-)

------
_sbrk
Perhaps not the "world's smallest", but pretty small:

[http://noplabs.com/cpm50/cpm50.html](http://noplabs.com/cpm50/cpm50.html)

------
soneil
Gosh, that PCB is a thing of beauty. Besides being a sucker for black
soldermask, labelling less really seems to make the labels more useful.

~~~
nsxwolf
There's something nice about all that classic silicon on such a clean, modern
looking board.

~~~
XtalJ
Thank you, it was exactly the look I was after :-) But the logo was supposed
to be copper but it is "silver". I don't really know why...

This was the effect I was looking for: [https://encrypted-
tbn2.gstatic.com/images?q=tbn:ANd9GcQHkdLM...](https://encrypted-
tbn2.gstatic.com/images?q=tbn:ANd9GcQHkdLMZGFgtIPDCgwjpn-9IR2JLjhdbPJG7jRJtjvixruE3R6jMA)

------
NanoWar
Similar project featuring a screen and I2C bus:
[http://benryves.com/projects/z80computer](http://benryves.com/projects/z80computer)

------
timonoko
This is just remarkably uninteresting. Interesting fact however is that there
is no CP/M simulator for Linux. Only MSDOS has. So you have to first run
DOSBOX and then CP/M. -- I recently found copy of MUMATH from 1979 and it was
as good as I remember it was.

~~~
david-given
There are plenty of CP/M simulators for Linux, but they're very niche and hard
to find (and use).

I used to do C development for the Z80 using one; it translated CP/M syscalls
to Linux ones, and would let me run the CP/M version of Hitech C more or less
as if it were native. It worked all right. Hitech C was only a K&R C compiler
and didn't produce great code, but it was entirely self-hosted.

The script and emulator I used came from here (look for 'Hitech C on Linux'):

[http://uzix.sourceforge.net/uzix2.0/index.php?page=down](http://uzix.sourceforge.net/uzix2.0/index.php?page=down)

...but while searching for that I found this other emulator, which looks a bit
more maintained:

[http://www.seasip.info/Unix/Zxcc/index.html](http://www.seasip.info/Unix/Zxcc/index.html)

