Z80 CPU emulator [with JIT compilation?], in rpython.
deesix 37ccf9701e Merge branch 'zexdoc' | 7 jaren geleden | |
---|---|---|
LICENSE | 7 jaren geleden | |
Makefile | 7 jaren geleden | |
README.md | 7 jaren geleden | |
memory.py | 7 jaren geleden | |
z80da.py | 7 jaren geleden | |
z80gen.py | 7 jaren geleden | |
z80th.py | 7 jaren geleden | |
zextests.py | 7 jaren geleden |
(experimental, work-in-progress, maybe not a good idea anyway)
Z80 CPU emulator [with JIT compilation?], in rpython.
Based on the GPLv3 python implementation by Jason Harris jth@mibot.com at https://github.com/deadsy/py_z80/commit/43ca1f309dff
Thanks, Jason!
Roadmap:
Bonus:
Any idea?
https://notabug.org/deesix/z80jit
deesix@tuta.io
The RPython compiler, that lives in the source tree of PyPy. It needs a C toolchain to compile rpython programs.
We use a little Makefile, so make is expected. Python 2 is used to generate the z80.py file and to run rpython (the compiler).
Please, check our Makefile. You may want to edit some paths in a bit.
For Debian 9 (Stretch) you can get it all by...
As root:
apt-get install --no-install-recommends build-essential devscripts debian-keyring python
As regular user from now on:
Copy the URL of the dsc listed in the Source Package section of:
https://packages.debian.org/stretch/pypy
Download and prepare the PyPy source tree (notice it's not wget):
dget http://http.debian.net/debian/pool/main/p/pypy/pypy_5.6.0+dfsg-4.dsc
Move it to ~/opt/pypy (where our Makefile expects it to be):
mkdir -p ~/opt
mv pypy-5.6.0+dfsg ~/opt/pypy
Edit our Makefile if your PyPy source tree is not at ~/opt/pypy.
For faster building (slower binary):
make zex0
This will create the zextests-c binary. You may want to rename it before making a different zex target.
See Makefile for different optimization levels.
See yaze 1.10 by Frank D. Cringle:
ftp://ftp.ping.de/pub/misc/emulators/
Mirror (see test directory):
https://github.com/lipro/yaze/tree/2a6161b5bcf866da442868cfa09bc47e79966951
The files are also available at, for example:
https://github.com/anotherlin/z80emu/tree/master/testfiles
To check if we're using the same files:
md5sum zexdoc.com zexall.com
be3691b6b910d2c2e05e194cd529e45c zexdoc.com
4a32f2a6691b3da5213d7688dda59822 zexall.com
Copy zexdoc.com alongside our new binary and:
time ./zextests-c