Z80 Based Homebrews - Nakazoto/Hellorld GitHub Wiki
Hellorld! on Z80-based Homebrew Computers
The 6502 is one epic processor that changed the world. It made home computing attainable and is even still used regularlay today in unlikely places, like graphing calculators. These homebrew computers take this epic CPU and use it in some of the most fascinating ways to print "Hellorld!" Entries are in alphabetical order.
Quick links:
Frank's RC2014 Pro | Grant Searle's Z80 | Interis 64 | John Winan's Z80 |
MAGI-B 2015 | PixelBrush's PIX80 | Test_Nuke's Z80 Breadboard | ZephyrZ80's BBZ80 |
Frank's RC2014 Pro
This particular RC2014 Pro was built by the talented Frank, and boy it sure is a looker, especially when it's running a Hellorld! program in CP/M! The RC2014 itself is a beautiful little modular machine with individual cards that plug into a backplane. This particular version is running a Pi Pico VGA terminal module in slot 4, a dual clock module in slot 5, a dual serial module in slot 6, the Z80 CPU module in slot 7, a 64k RAM module in slot 8, a pageable ROM module in slot 9, and a compact flash module in slot 10.
The code for "Hellorld!" is written in assembly and executed through CP/M!
Click here for more details on the RC2014.
Click here for this specific kit.
Code:
org 100h
bdos equ 005h
start: mvi c,9
lxi d,msg$
call bdos
ret
msg$: db 'Hellorld!$'
end
Grant Searle's Minimal Chip Count Z80
Back in 2007 Grant Searle released a really elegant design for a minimal chip count Z80 homebrew computer. It uses a Z80 CPU at 7MHz, 8K of ROM 56K of RAM, and a 115200 Baud serial interface. Dadecoza over on the Discord built one of these little gems up and got it running "Hellorld!" Also, not for nothing, that Wyse terminal Dadecoz is using is absolutely stunning!
For more information on Grant Searle's Z80, check this link here.
Code:
ORG 0x5000 ; Program start at address 5000H
LD HL, message ; Load memory location of message into HL
nextChar LD A,(HL) ; Read a character from the memory location stored in HL
CP 0 ; Check if it is the null terminator
JR Z,done ; If it is jump to done
RST 08H ; Else print the chacter to the screen
INC HL ; Increment HL
JR nextChar ; Continue with the next character
done RET
message DEFB 0x48 ; 'H'
DEFB 0x65 ; 'e'
DEFB 0x6C ; 'l'
DEFB 0x6C ; 'l'
DEFB 0x6F ; 'o'
DEFB 0x72 ; 'r'
DEFB 0x6C ; 'l'
DEFB 0x64 ; 'd'
DEFB 0x21 ; '!'
DEFB 0x0D ; CR
DEFB 0x0A ; LF
DEFB 0 ; Null Terminator
END
Interis 64
The Interis 64 has some pretty impressive specifications for a homebrew:
- Zilog Z80 CPU at 7.4MHz
- 32KB System ROM
- 64KB SRAM
- PS/2 Keyboard Support
- RS-232 Serial Port
- Battery-backed SRAM and Realtime Clock
- Four expansion card slots The expansion slots in particular are quite neat, priming the system for future expansion. Of course, the most important expansion is running "Hellorld!" which it does with ease!
Code:
ORG $1000 ; Start address
LD HL, Hellorld ; Load the pointer
LD A, $06 ; $06 is the ROM system call for PrintChar
LD ($FFFF),A ; Set the system call ID
Loop:
LD A,(HL) ; Get character at HL
OR A ; Is it $00?
RET Z ; If so, then we're at the end and can return
RST $10 ; Execute the ROM system call to print it
INC HL ; Next character
JR Loop ; Continue until $00
Hellorld:
DB $0D
DB $0A
DB "Hellorld!"
DB $00
John Winan's Z80 Retro!
This Z80 single board computer is specifically designed to be affordable and easy to build. It is exactly 100x100 mm, because both PCBway and JLCpcb offer steep discounts at or below that size. The only SMD parts are the µSD card socket and a 3.3V regulator on the back, but those can be raplaced by a Sparkfun SD card holder. That way, no SMD soldering is required to build the board. It runs a Z80 at 10 MHz, has 512kB of banked SRAM, 128k of Flash ROM (I used an EPROM because I had one), a Zilog SIO for 2 serial ports, a Zilog CTC for programmable baudrates, and a printer port implemented with TTL chips. John ported CP/M 2.2 on it, and I Have ported CP/M 3 to it as a first project in Z80 assembly. It also runs FUZIX, and there are multiple ROM variants for it.
John has a large Playlist where he goes through the whole process of designing and building the board and porting CP/M for it.
He also created a GitHub repo for the project with everything you need to get started. Here is me booting my CP/M 3 on it and writing, assembling and linking Hellorld! on it. Couldn't resist the temptation to play around a bit.
Code:
org 100h
ld c,9 ; The BDOS print function
ld de,string ; The string adress
call 5 ; Entry to CP/M BDOS
jp 0 ; Exit through warm boot
string: db 'Hellorld!',10,13,'$'
end
MAGI-B 2015
This one is unique among the homebrew world for one very big reason, but first, the main specs. It's a Z80 based homebrew running at 1.834MHz with 32k of RAM and ROM and an 8251 USART for serial communication with a terminal. But if you look closely, the text on the screen isn't being printed by serial communication, it's coming from a full on TMS9918 Video Display Processor! The very same VDP used in the venerable TI-99, a system I have a particular soft spot for. This particular setup uses an SRAM chip to give the 9918 VDP access to 16k of video memory. It also uses a PATA port for mass storage, a PIO for future keyboard support and expansion, as well as an SN76489 for some audio shenanigans that are in the works (another TI chip, so another point from me!).
Code (this is just the code for the first two letters):
LD HL, 0x0800 ;NAME TABLE BASE
LD A, 0x28 ;H
CALL VDP_WRITEADDR
LD HL, 0x0801
LD A, 0x25 ;E
CALL VDP_WRITEADDR
PixelBrush's PIX80
The PIX80 is a very cool little homebrew designed by PixelBrush. It's designed to be as simple as possible so anyone can get their own version of it up and running using a minimum number of chips. It's helping to break down the barrier of entry for homebrews, and that makes it very special in my book! At it's core, it just needs a Z80 based CPU, 32k of ROM and 32k of RAM, but there are several working and planned peripherals like an LCD display, PS/2 keyboard port, RS-232, VGA and more.
Check out PixelBrush's Wiki on the PIX80 here!
There's a few videos up on Youtube about the homebrew here!
Code:
3E 38 D3 00 3E 38 D3 00 3E 38 D3 00 3E 38 D3 00
3E 0C D3 00 D3 00 3E 01 3E 06 D3 00 3E 80 D3 00
DD 21 00 00 DD 7E 33 FE 00 28 07 D3 01 DD 23 C3
24 00 76 48 65 6C 6C 6F 72 6C 64 21 00
Test_Nuke's Z80 Breadboard Computer
This is a very cool homebrew in that it is fully on breadboard’s, drawing inspiration from Ben Eater’s series. However, instead of a 6502, this one uses a Z80, PIO, CIA, 32k SRAMs, and an AT28C256 ROM. Ben Eater wasn’t the only inspiration however, the RC2014 also lent a hand. Clocked at 1 MHz, it’s a pretty impressive little breadboard homebrew. The million dollar question though is “can breadboards ‘Hellorld’?” And the answer is a resounding yes! The code is quite long, coming in at 351 lines, but it’S beautifully baremetal.
Here is a small snippet of code:
...
000286 0111 ;Set port B as outputs
000287 0111 LCDPIO_SET_B_OUT
000288 0111 3E CF ld a, LCDPIO_Mode3
000289 0113 D3 03 out (LCDPIO_B_Command), a
000290 0115 3E 00 ld a, LCDPIO_Mode3OUT
000291 0117 D3 03 out (LCDPIO_B_Command), a
000292 0119 C9 ret
000294 011A ;Set port B as inputs
000295 011A LCDPIO_SET_B_IN
000296 011A 3E CF ld a, LCDPIO_Mode3
000297 011C D3 03 out (LCDPIO_B_Command), a
000298 011E 3E FF ld a, LCDPIO_Mode3IN
000299 0120 D3 03 out (LCDPIO_B_Command), a
000300 0122 C9 ret
000302 0123 ;Transmit to port a
000303 0123 LCDPIO_A_OUT
000304 0123 D3 00 out (LCDPIO_A_Data), a
000305 0125 C9 ret
...
Full code available at this link.
ZephyrZ80's BBZ80
This is a cool little Homebrew built by ZephyrZ80. If the name of the homebrew and the name of the mad scientist who built it didn't give it away, it's a Z80 based computer running at 10MHz with 32KB of SRAM, 8KB of NVRAM, and a Z85C30 SCC acting as a UART connection for input and output. What's really cool though is it's all currently living on a breadboard, and I always love seeing breadboard computers!
Code:
8000: 21 0C 80 7E A7 28 04 D7 23 18 F8 CF 0D 0A 48 45
8010: 4C 4C 4F 52 4C 44 21 00 1A 1A 1A 1A 1A 1A 1A 1A