Metadata-Version: 2.4
Name: zx
Version: 0.13.14
Summary: ZX Spectrum emulation framework
Home-page: https://github.com/kosarev/zx/
Author: Ivan Kosarev
Author-email: Ivan Kosarev <mail@ivankosarev.com>
License: MIT
Project-URL: Homepage, https://github.com/kosarev/zx/
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pysdl2
Requires-Dist: pysdl2-dll
Requires-Dist: numpy
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# zx
ZX Spectrum emulation framework in Python and C++

[![CI](https://github.com/kosarev/zx/actions/workflows/python-package.yml/badge.svg)](https://github.com/kosarev/zx/actions/workflows/python-package.yml)
[![PyPI](https://img.shields.io/pypi/v/zx)](https://pypi.org/project/zx/)
[![Python](https://img.shields.io/pypi/pyversions/zx)](https://pypi.org/project/zx/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/kosarev/zx/blob/master/LICENSE)

![Elven](https://raw.githubusercontent.com/kosarev/zx/master/screenshots/elven.png "Elven Warrior")

[More screenshots](https://github.com/kosarev/zx/tree/master/screenshots)


### Features
* Designed to be suitable for research and development purposes
  such as unattended testing of Spectrum software, timing
  analysis, etc.
* Meant to be easy to customize and re-use via Python interfaces.
* Fast and accurate emulation.
* Supported formats: snapshots (`.z80`), tapes (`.tap`, `.tzx`, `.wav`),
  playbacks (`.rzx`), screenshots (`.scr`),
  [ZX Basic](https://github.com/boriel/zxbasic) sources (`.zxb`),
  archives (`.zip`).
* Based on the fast and flexible
  [Z80 emulator](https://github.com/kosarev/z80).


### Development status

* Platforms: Linux and Windows (via SDL2).
* General status: working pre-alpha.
* Supported machines: 48K only for now.
* Display: multi-colour effects,
  [accurate timings](https://github.com/kosarev/zx/blob/master/test/screen_timing).
* Sound: EAR beeper and tape output supported.
* Tape: TAP and TZX formats supported as well as conversion to WAV.
* Snapshots: Z80.
* Playback recordings: RZX.
* Joystick: D-Pad mapped to cursor keys, supported via SDL.


### Installation and running

Install from PyPI (pre-built wheels for Linux and Windows, source for other platforms):
```shell
$ pip install zx
```

Standalone executables for Linux x86\_64 and Windows x64 are available on the
[Releases page](https://github.com/kosarev/zx/releases).

For the current development version:
```shell
$ pip install git+https://github.com/kosarev/zx
```

Local development setup:
```shell
$ git clone --recursive https://github.com/kosarev/zx
$ cd zx
$ pip install --editable .
```

Running:
```shell
$ zx
```

Press `ESC` or `F1` to open the main menu.


### Running snapshots, recordings and tapes

```shell
$ zx elven.z80
```

```shell
$ zx exolon.rzx
```

```shell
$ zx https://www.worldofspectrum.org/pub/sinclair/games/e/EricTheFloaters.tzx.zip
```


### Converting files

```shell
$ zx jack.tzx jack.wav
```

```shell
$ zx eric.tap eric.z80
```


### Dumping files

```shell
$ zx dump rick.z80
OrderedDict([('id', 'z80_snapshot'), ('a', 213), ('f', 66), ...
```

On the `dump` command, **zx** parses the specified file (that can
be of any supported format) in the form of raw Python data.


### Reference papers

* [Screen timings](https://github.com/kosarev/zx/blob/master/test/screen_timing/SCREEN_TIMING.md)
