Coder Social home page Coder Social logo

z80-python-emulator's Introduction

Z80 CPU Emulator

This is a Zilog Z80 CPU emulator, written in Python. It runs a 1978 Microsoft Basic 4.7 ROM taken from Grant Searle's Z80 SBC project

Why?

Just for fun. I like the Z80 CPU - it was in many devices I played with as a kid.

Is it useful?

No. It runs really slowly, and is a completely non-optimal software design for an emulator, but (in my opinion) the code is readable. If you want a CPU emulator, probably don't use Python. That said, an optimised python coded emulator could run a lot faster than this :-)

Running

BASIC:

cd src
python z80sbc.py

Unit tests:

cd src
PYTHONPATH=`pwd`:$PYTHONPATH python ../tests/test_z80.py
PYTHONPATH=`pwd`:$PYTHONPATH python ../tests/test_registers.py

Fuse tests:

cd src
PYTHONPATH=`pwd`:$PYTHONPATH python ../fuse_tests/tests.py

Missing and todo

  • Most undocumented opcodes
  • Undocumented flags for CPI and CPIR.

Credits

Grant Searle's Z80 SBC project

FUSE - Free Unix Spectrum Emulator for the instruction set tests

License

Public domain; do what you like.

z80-python-emulator's People

Contributors

cburbridge avatar penguin86 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.