All Projects → MohammedRashad → ArduZ80

MohammedRashad / ArduZ80

Licence: MIT license
The first Z80 emulation library for Arduino

Programming Languages

C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to ArduZ80

Zany80
Zany80 fantasy computer system
Stars: ✭ 48 (+9.09%)
Mutual labels:  emulation, z80
lighthouse-of-doom
A simple text-based adventure game
Stars: ✭ 52 (+18.18%)
Mutual labels:  z80, z80asm
Adafruit-SSD1331-OLED-Driver-Library-for-Arduino
For 0.96" OLEDs in the Adafruit shop
Stars: ✭ 94 (+113.64%)
Mutual labels:  arduino-library
arduino-remote-uploader
Over-the-air arduino programming via xbee, wifi or nordic
Stars: ✭ 31 (-29.55%)
Mutual labels:  arduino-library
LudOS
Just enough OS for libretro using the Ludo frontend on a LibreELEC 9.2 base
Stars: ✭ 36 (-18.18%)
Mutual labels:  emulation
ESP32Time
An Arduino library for setting and retrieving internal RTC time on ESP32 boards
Stars: ✭ 120 (+172.73%)
Mutual labels:  arduino-library
Nes Snd Emu
NES / Famicom sound library, descended from blargg's Nes_Snd_Emu
Stars: ✭ 19 (-56.82%)
Mutual labels:  emulation
MSXPi
Interface for MSX to Connect and use Raspberry Pi resources
Stars: ✭ 61 (+38.64%)
Mutual labels:  z80
HiSoft-C
Disassembled code of HiSoft C compiler for ZX Spectrum
Stars: ✭ 20 (-54.55%)
Mutual labels:  z80
PCF8591 library
Library to use i2c analog IC with arduino and esp8266. Can read analog value and write analog value with only 2 wire (perfect for ESP-01).
Stars: ✭ 24 (-45.45%)
Mutual labels:  arduino-library
tfmini
An Arduino driver for the Benewake TFMini time-of-flight distance sensor
Stars: ✭ 32 (-27.27%)
Mutual labels:  arduino-library
ESP8266MQTTClient
No description or website provided.
Stars: ✭ 77 (+75%)
Mutual labels:  arduino-library
SoftWire
Software I2C implementation for Arduino and other Wiring-type environments
Stars: ✭ 105 (+138.64%)
Mutual labels:  arduino-library
EByte LoRa E22 Series Library
Arduino LoRa EBYTE E22 device library complete and tested with Arduino, esp8266, esp32, STM32 and Raspberry Pi Pico (rp2040 boards).. sx1262/sx1268
Stars: ✭ 67 (+52.27%)
Mutual labels:  arduino-library
TLV493D-A1B6-3DMagnetic-Sensor
Library for the TLV493D-A1B6 3D magnetic sensor for Arduino.
Stars: ✭ 27 (-38.64%)
Mutual labels:  arduino-library
SparkFun MMA8452Q Arduino Library
SparkFun Triple Axis Accelerometer Breakout - MMA8452Q Arduino Library
Stars: ✭ 16 (-63.64%)
Mutual labels:  arduino-library
ares
ares is a cross-platform, open source, multi-system emulator, focusing on accuracy and preservation.
Stars: ✭ 465 (+956.82%)
Mutual labels:  emulation
Adafruit MP3
mp3 decoding on arduino
Stars: ✭ 29 (-34.09%)
Mutual labels:  arduino-library
ostrich
A Game Boy Sound System player for macOS, written in Swift
Stars: ✭ 37 (-15.91%)
Mutual labels:  z80
android-hce-desfire
A HCE software implementation of the NXP Desfire NFC protocol in an Android app (to be used with Cyanogenmod HCE patch)
Stars: ✭ 30 (-31.82%)
Mutual labels:  emulation

ArduZ80

The first Z80 emulation library for Arduino, bringing back the old Z80 to life.

Now Available on the Arduino LibraryManager & Arduino Playground

Introduction

Studying microprocessors for a semester project, I had to write an emulator, and I chose Z80 to be my study case. my project had to be in arduino, so the emulator itself must run on arduino, I searched the internet and no working project or library where found for Z80 to emulate it on arduino, I decided to write my own library and emulator system and revive the Z80 through Arduino, it was a great processor for hobbyists and students and very good to study computer architeture on it.

Zilog Z80

The Z80 microprocessor is an 8 bit CPU with a 16 bit address bus.
It has a language of 252 root instructions and an additional 308 instructions.
The Z80 was modeled after the 8080 and contains the 78 opcodes of 8080 opcodes as a subset to it's language.
Programming features include an accumulator and six eight bit registers that can be paired as Three 16 bit registers.
In addition to the general registers, a stack-pointer, program-counter, and two index (memory pointers) registers are provided.

Features

  • Interpretation-Based.
  • Written and optimized for Arduino.
  • Tested on Arduino Nano, Uno, Mega.
  • ALU, Buses, Registers, Control Unit emulated.
  • Emulates 260 Instructions (177 Basic Instructions, 83 Extended Instructions).
  • Implementation of IN and OUT instruction left for developer to customize his system.
  • built with customization and extensibility in mind, adding a new instruction takes 3 lines only.

Usage

Step 1:

//Make an array to hold the program
uint8_t t[30] = {

EXT_FD, FD_LD_A_imm, 0x00,
EXT_DD, DD_LD_B_imm, 0x09,
EXT_DD, DD_LD_C_imm, 0x03,
XOR_A_B, 
XOR_A_C, 
XOR_A_imm, 0xFF,
NOP

};

Step 2 :

//Copy the program to RAM 
for (int i = 0; i < 30; i++) {

    cpu.ram_[i] = t[i];

}

Step 3 :

//Run the CPU 
cpu.run_to_nop(true);

Step 4 (Optional) :

//Implement write_io and read_io 

void ArduZ80::write_io(uint16_t addr, uint8_t val){ }

uint8_t ArduZ80::read_io(uint16_t addr){ return data; }

Credits

  • Sijmen Smulder for his C++ emulator, helped as a base for my Arduino version.
  • Gabriel Gambetta for his C library, helped to understand some instructions and tweak emulator.

License

This library is signed under MIT License, Reproduce under it's terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].