Z80 Mark 2

New Z80 Project Photos

Last updated: 16 Mar 2011 - 16:41

I've just uploaded a group of new photos to the existing Z80 project gallery. These show the new MMU and the UI board, never before seen on the internet!

Section:
Z80 Project
Tags:
Z80 Mark 2,
retro-computing,
photos

Z80 Project Memory Expansion

Last updated: 14 Mar 2011 - 00:11

The Mark 2 Z80 project featured a pair of memory slots each capable of taking up to 32K of RAM. This meant that a full 64K of RAM could be used because the ROM image is copied from the PIC's memory at boot time. However that didn't seem like much to me so a banking system and MMU were in order. (Also I found I couldn't get the 32K RAMTRON FM1808 chips in DIP any more!)

The new system is designed around 512K SRAM chips, up to 8 of them, although I've only wired up two sockets for 1MB of RAM for now. If you know your base 2 maths you should realise that I need a 22 bit address bus for the 4MB address space. This initially seems like an odd size but the design is based on the internals of the Amstrad NC100, a portable Z80 machine from the early '90s. The top 8 bits of the 22 are provided by one of four latches. Which of these latches provides the last 8 bits is decided by the Z80 address lines A14 and A15.

This means the physical memory space of the Z80 is made up by four 16K

Section:
Z80 Project
Tags:
Z80 Mark 2,
Retro Computing,
eda,
logic

Z80 Mark 2: The Great Documentation Project

Last updated: 19 Dec 2010 - 12:33

I recently received an enquiry about how the I/O throttling on the PIC worked to ensure that the PSP was shifting valid data out to the Z80. I had a look back at my code and figured out how I'd done it. However I realised in that conversation that the schematics for the project were vastly out of date and it seemed that I hadn't been keeping as up to date as I thought I was with my local copies. I've spent several evenings in the last week and more or less re-drawn all the schematics from scratch, referencing the old snippets and the code and occasionally resorting to the continuity tester!

The schematics are in a number of fairly self contained PDFs here, I'll push the KiCAD source to git hub in the new year after I've finished my Christmas trips. Each unit of the system is mainly only connected by the Z80 busses (data, control and address) although the interrupt controller and the I/O decode have a lot of ancillary signals in them. Hopefully this is all fairly clear, it inclu

Section:
Z80 Project
Tags:
Z80 Mark 2,
retro-computing,
electronics,
schematics,
kicad,
eda

Z80 Project Updates and Revision Control

Last updated: 26 Mar 2010 - 22:39

It's been a (very) long time since the last update to this project. I've been busy on loads of new stuff for the project. The system is now capable of booting a binary from SD card or USB memory stick formatted in either FAT16 or FAT32. There's also full PS/2 keyboard support, a much more sophisticated interrupt control mechanism and a VGA display now.

I'm planning to go through all these new features and write-up how I've got there but for now I'm just going to do a summary. Since my last update, I have built a basic chassis to contain the growing number of boards and hold all the connectors, there's a new connector board which has the USB host sockets, an SD card slot, PS/2 keyboard connector a composite video output connector and a 3.3V and 5V power supply. This connects up to the original pair of boards providing power and two LEDs (one is driven by the PIC as a "hard disk light" when accessing the SD, the other is driven by a transistor from the Z80's HALT line), the 5-pin

Section:
Z80 Project
Tags:
Z80 Mark 2,
Z80 homebrew,
Retro Computing,
GIT

Z80 Project Mark 2: More UART Shenanigans

Last updated: 18 Jan 2010 - 22:38

A couple of minor updates you might be interested in. I got a quick demo echoing characters back to the PC working last week. This uses the interrupt on receive feature of the UART setup to trigger a send routine as soon as a character is received. The demo code is available on the Z80 Project page.

It's all fairly simple but there are a few delay loops and things involved. It's also worth checking out the updated Memory and IO schematic as I've updated it with the software reset control for the UART. The only problem I had with this new bit of code was that the compiler wasn't doing exactly what I expected. After a bit of fiddling and dis-assembly I discovered that (probably fairly logically) the org statement doesn't pad the output with anything when generating the binary file, it just offsets the current count for calculating jumps. This of course meant that when I downloaded the binary file I'd generated the first instruction was a jump that missed the entire block of cod

Section:
Z80 Project
Tags:
programming,
Z80 Mark 2,
Z80 homebrew,
RS232,
assembly code

Nathan's Z80 Project Mark 2: Serial bug killer

Last updated: 10 Jan 2010 - 21:50

I left my Z80 project behind when I went to see family over Christmas, I did do a tiny bit of coding while I was on holiday but not much. Back in snowy Bath this weekend I got some more done on the project. I've spent a lot of time on the documentation. The main reason for this is the fact that I keep doing bits then not looking at it for a couple of weeks and I forget where I was and what changes I'd made. I'm also hoping to use a lot of the circuit designs in the Mark 3 project at some point in the future and if they're out of date and un-documented it could result in some expensive and useless PCBs.

Actual real progress: Update BIOS image via debug port. A python library to make comms with the PIC easier. UART fitted and debugged. Some additional commands in the PIC firmware including the ability to perform a system reboot from the host PC.

After some head-scratching I managed to get the BIOS update via the serial port working. I basically copied the code examples fro

Section:
Z80 Project
Tags:
Z80 Mark 2,
Z80 homebrew,
UART,
datasheets

Nathan's Z80 Project Mark 2: An actual Z80!!

Last updated: 06 Dec 2009 - 18:20

At long last I've fitted a Z80 into the Z80 computer. I know shocking isn't it. After months of tinkering with it and fiddling with things using the on-board PIC I finally got the boot code sorted out and the clock generation (in the new file called boot.asm). After some serious head scratching about why id didn't work, I got it all running smoothly and counting on the debug port LEDs.

New Code I've added the boot.asm file which contains the code to copy the top 8K of flash from the PIC into the system memory starting at address 0. This, along with the rest of the boot setup happens faster than you can see so it looks like the system is booting straight from ROM. The clock generation is also in the new code, I've used one of the PWM peripherals in the PIC to generate a 50% duty ratio square wave at a software selectable rate. At the moment it's hard coded into the PIC assembly code, and it's only running at 250kHz because my scope is pretty slow and I was hav

Section:
Z80 Project
Tags:
retro,
Z80 Mark 2,
Z80 homebrew

Nathan's Z80 Project Mark 2: Memory Installed!

Last updated: 18 Oct 2009 - 21:08

More progress on the Z80 project; I have fitted the first RAM chips tonight. After sorting the code so far into 3 source files, I implemented the memory read and memory write functions. These appeared to work on single memory locations, so I implemented the block read and write functions. Using a Python script (see the Z80 Project page for the file) I wrote the XOR combination of the high and low address bytes to each memory location, then read the memory back and tested it against this value.

So far I've fitted one 32K RAM chip in the lower half of the address space and an 8K chip in the upper half. This shows up correctly on the memory check. The script writes address from the top down, so when the 8K chip gets written with the data for the top 8K of memory this is subsequently over written with the chip in its lowest possible space. Hence the memory scan determines that there is memory up to address 0x9FFF (40K).

Due to the maximum packet size of 256 bytes, the maximum d

Section:
Z80 Project
Tags:
Python,
Z80 Mark 2,
Z80 homebrew

Nathan's Z80 Project Mark 2: Tidying and Sorting

Last updated: 14 Oct 2009 - 22:36

I've re-arranged the site a bit. I've added a new section with its own link at the top of the site entitled "Z80 Project". This page gives quick access to all the information on the project and links to downloads. At the moment I've not put much on the page, but I'll add stuff as I get it sorted enough to publish.

I've also been coding. I've got the first commands running, I can change the LED status on the debug port with a command sent over the serial link now. A lot of the background code to do with bus management etc. is all sorted out as well now (although not very thoroughly tested). The biggest change to take note of since my last bit of documentation on the website though is that I've scrapped the ASCII based command codes. This initially seemed like a good idea because the commands could be sent from any text-terminal, but since the packet format evolved to require a binary packet length field, this advantage was lost. So I dumped the ASCII to reduce the over head a

Section:
Z80 Project
Tags:
Z80 Mark 2

Nathan's Z80 Project Mark 2: Comms Protocol

Last updated: 09 Oct 2009 - 20:54

More progress has happened already!! I managed to get a basic comms protocol up and running to allow a flexible command structure for accessing the PIC's debug functions. The comms protocol makes considerable use of the 18F's additional commands and indirect addressing, and is quite generous with RAM since the 4520 version has 1.5KB available.

Section:
Z80 Project
Tags:
Z80 Mark 2,
Z80 homebrew

Contact

Email: nathan@nathandumont.com

Mastodon: @hairymnstr@mastodon.social