Skip to content

Building a Z80 emulator in C# as a .NET Standard Class Library. Includes a sample implementation in the form of a ZX Spectrum 48K emulator.

License

Notifications You must be signed in to change notification settings

essenbee/z80emu

Repository files navigation

z80emu

Workflow Licence Twitch Twitter Nuget

Building a Z80 emulator in C# 7.3 as a .NET Standard 2.0 Class Library using the Test Driven Development (TDD) mindset. The aim is to create an accurate emulation of the Z80 CPU as a nuget package for general use. We will then go on to use the emulated CPU in a larger project to emulate a particular machine, a ZX Spectrum probably, since it has a very simple architecture, and the project is not really about creating such an emulator. Development will happen both on and off my Twitch live-coding stream, https://twitch.tv/codebasealpha.

Known as Project Z, coverage of this project begins from Episode 66. Use the link above to follow me on Twitch and be notifed when I am streaming (normally twice a week on Mondays and Wednesdays, but I sometimes run unscheduled pop-up streams).

2020-03-15: Essenbee.Z80 nuget package released!

Sample Project

The included project Essenbee.Spectrum48 is an example implementation using the Z80 emulator. It is a very simple and currently quite limited emulation of a ZX Spectrum 48K. It is possible to program in BASIC using this emulation. At the time of writing, I have successfully run the following games on the emulation (as yet, without sound):

  • King's Ransom (an "illustrated" text adventure)
  • Dizzy II - Treasure Island Dizzy
  • Galaxians (shoot-em up)
  • Pyramid (shoot-em up)
  • Lords of Midnight (strategy)

Who knows how sophisticated (or not) it might become over time? If you would like to contribute code for the sample (or any other project), why not submit a Pull Request? Check out the Issues list for things I need help with.

image

image

YouTube

The videos for Project Z episodes are archived on YouTube here. Please subscribe to my YouTube channel to get notified when new videoes are uploaded. Subscribing is free and it helps me out a lot.