Skip to content

Latest commit

 

History

History
65 lines (40 loc) · 2.92 KB

README.md

File metadata and controls

65 lines (40 loc) · 2.92 KB

Z80RetroShield

The RetroShield is an addon/shield for the Arduino Mega which allows your arduino to drive, control, and interact with a real processor.

This library is designed to work with the Z80-based retroshield, allowing you to experiment and build projects which use a Z80.

Motivation

The retroshield project contains some sample code, however that sample code mixes the actual Z80-usage with some unrelated things, (button-scanning, LCD display, SPI-RAM access etc), which makes it harder to use as a standalone "thing".

This repository aims to make the Z80 retroshield easier to deal with, by abstracting the CPU-driving into a single standalone class, and packaging it as a library for the Arduino IDE. This should allow you to use it in your arduino-sketch along with whatever else you wish to do.

Installation

If you wish to install the library manually you can clone this repository beneath your arduino libraries folder, or download a release there.

The simpler way to install is via the Arduino library manager, enter "z80" into the search box and you'll find the library. Click "install" to install, then restart your IDE and open the examples:

Screenshot

Usage

The examples included within this library should be sufficient to demonstrate how to use the class, but in brief you:

  • Instantiate an instance of the Z80RetroShield object.
  • Configure a small number of callbacks
    • Which are fired to read/write RAM and handle I/O.
  • Call Tick() to allow the Z80 processor to execute.

Examples

You can view the examples by exploring the repository, and the examples should be visible via the Arduino-IDE interface:

  • basic
    • A BASIC interpreter, written in Z80 assembly!
  • ram-test.ino
    • Tests a simple program for reading/writing to RAM.
  • hello.ino
    • A simple example which writes a message to the serial-console.
  • speed_test.ino
    • Shows how many ticks/cycles we execute a second.
    • This shows the overhead of using the driver.
  • uc.ino
    • Read from serial-console, and output the input in upper-case.

Links

Now some Z80 links

Steve