{"id":13436770,"url":"https://github.com/rustzx/rustzx","last_synced_at":"2025-03-18T21:31:02.838Z","repository":{"id":37965425,"uuid":"50881863","full_name":"rustzx/rustzx","owner":"rustzx","description":"ZX Spectrum emulator written in Rust","archived":false,"fork":false,"pushed_at":"2024-07-26T13:25:11.000Z","size":1260,"stargazers_count":199,"open_issues_count":27,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-08-05T19:25:10.578Z","etag":null,"topics":["ay-3-8910","emulator","rustzx","z80","zx-spectrum","zx-spectrum-emulator"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rustzx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-02T00:26:15.000Z","updated_at":"2024-08-05T19:25:17.135Z","dependencies_parsed_at":"2024-06-19T02:50:08.943Z","dependency_job_id":"21ed9e79-9f3a-41d8-aa91-81f9dc479bc9","html_url":"https://github.com/rustzx/rustzx","commit_stats":null,"previous_names":["pacmancoder/rustzx"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustzx%2Frustzx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustzx%2Frustzx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustzx%2Frustzx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rustzx%2Frustzx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rustzx","download_url":"https://codeload.github.com/rustzx/rustzx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244310518,"owners_count":20432554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ay-3-8910","emulator","rustzx","z80","zx-spectrum","zx-spectrum-emulator"],"created_at":"2024-07-31T03:00:51.992Z","updated_at":"2025-03-18T21:31:00.426Z","avatar_url":"https://github.com/rustzx.png","language":"Rust","funding_links":[],"categories":["应用","Applications","应用程序 Applications"],"sub_categories":["Emulators","模拟器 Emulators"],"readme":"RustZX\n===============================\n\n[![RustZX CI](https://github.com/rustzx/rustzx/actions/workflows/ci.yml/badge.svg)](https://github.com/rustzx/rustzx/actions/workflows/ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/rustzx)](https://crates.io/crates/rustzx)\n[![License](https://img.shields.io/crates/l/rustzx)](https://github.com/rustzx/rustzx/blob/master/LICENSE.md)\n[![Discord](https://img.shields.io/discord/844696167794475009?logo=discord\u0026logoColor=white)](https://discord.gg/aSHJh8UJre)\n\n![logo](assets/logo_small.png)\n\nZX Spectrum emulator written in Rust.\n- Watch [this](https://youtu.be/Xho3GWFyP2I) video showcase (`v0.9.x`)\n- Read [CHANGELOG.md](CHANGELOG.md) for info on the latest version changes\n\n## Features\n- Written in pure rust\n- Cross-platform\n- Full ZX Spectrum 48K and 128K emulation\n- Highly accurate emulation of Z80 core\n- Highly precise AY chip emulation\n- Beeper sound emulation\n- Supported formats:\n    - `tap` - tape\n    - `sna` - snapshot, both 48K and 128K versions supported\n    - `szx` - snapshot, both 48k and 128k versions supported along with\n        zlib compression.\n    - `scr` - screenshot\n- Fast loading of tap files with standard loader\n- Very accurate timings\n- Full border emulation\n- Joystick emulation: Kempston, Sinclair\n- Kempston mouse emulation\n- Extended 128K keys emulation (arrows, backspace, caps lock)\n- Quick save/load\n- Compressed assets support (only `.gz` for now)\n- Separate `no_std` core library which can be used to port emulator\n  almost anywhere.\n    - Global allocator is still needed, but all dynamic\n       allocations are minimized\n    - All resource-heavy features are configurable via cargo `features`\n- Obscure Z80 features emulation:\n    - `WZ/memptr` register (`F3/F5` flags obscure behavior in `BIT n, (HL)`)\n    - `Q` register (`F3/F5` flags obscure behavior in `SCF` and `CCF`)\n    - Block instruction flags [oddities](https://github.com/MrKWatkins/ZXSpectrumNextTests/tree/develop/Tests/ZX48_ZX128/Z80BlockInstructionFlags) (`LDxR`/`CPxR`/`INxR`/`OTxR`)\n\n## Install\n1. Ensure that you have C compiler and CMake to build bundled `sdl2`\n2. Linux only: Install required development packages: [`libasound2-dev`]\n3. Install it with cargo\n```bash\ncargo install rustzx\n```\n\n## How to use\n```bash\nrustzx --help # Show help\nrustzx test.tap # Autodetect file type and run in 48K mode\nrustzx --ay test.tap # Run in 48K mode with AY sound chip\nrustzx -m128 --tape test128.tap # Run in 128K mode with tape\nrustzx --rom tester.rom -s3 # Run with custom rom and 3x screen scaling\nrustzx --nofastload test.tap # Run without fast tape loading\nrustzx --mouse test.tap # Run with Kempston mouse support\n```\nFor loading tape in 48K mode, press `j` then `Ctrl+p` twice, as on a real Spectrum.\nYou should see `LOAD \"\"` on emulator's screen, then press `Enter` (in 128K mode just press enter).\nIn `--nofastload` mode, press `Insert` to play the tape and `Delete` to stop.\n\nIf you have choppy audio, try `--sound-latency` option with bigger values.\n\n## Default key bindings:\nShortcut Key    | Function\n----------------|-----------\n `F1` | Quick save\n `F2` | Quick load\n `F3` | Set normal emulation speed\n `F4` | Set 2x emulation speed\n `F5` | Max possible emulation speed\n `F6` | Enable frame trace info\n `F9` | Enable Kempston/Sinclair joy keyboard layer\n `Insert` | Start tape\n `Delete`| Stop tape\n `End` | Break command\n `Caps Lock` | Caps lock command\n `Backspace` | Delete\n `\u003cArrows\u003e` | 128K arrow keys\n `Esc` | Unlock mouse (if `--mouse` is used)\n\n## In joy keyboard layer mode (F9)\nShortcut Key    | Function\n----------------|-----------\n `\u003cArrows\u003e` | Kempston joy *arrows*\n `Alt` | Kempston *fire*\n `WASD`| Sinclair Joy 1 *arrows*\n `Caps Lock` | Sinclair Joy 1 *fire*\n `IJKL`| Sinclair Joy 2 *arrows*\n `Enter` | Sinclair Joy 2 *fire*\n\n## Screenshots\n![](screenshots/rain.png)\n![](screenshots/q.png)\n![](screenshots/arkanoid.png)\n![](screenshots/sentinel.png)\n\n## References\nMany resources were used to find out how to build this emulator.\nHuge thanks to the following resources that helped figure out a lot of\ndetails about ZX Spectrum.\n-  [z80.info](http://www.z80.info/) of course!\n- [Decoding Z80 opcodes](http://www.z80.info/decoding.htm)\n- [Opcodes list](http://www.z80.info/z80code.txt)\n- [CPU user manual](http://www.z80.info/zip/z80cpu_um.pdf)\n- [CPU architecture](http://www.z80.info/z80arki.htm)\n- [Interrupt behaviour](http://www.z80.info/interrup.htm)\n- [Z80 undocumented documented](http://www.z80.info/zip/z80-documented.pdf)\n- Instruction table from [ClrHome](http://clrhome.org/table/)\n- \"Floating bus explained!\" by [Ramsoft](http://ramsoft.bbk.org.omegahg.com/floatingbus.html)\n- 16K / 48K ZX Spectrum [Reference](http://www.worldofspectrum.org/faq/reference/48kreference.htm)\n- 128K ZX Spectrum [Reference](http://www.worldofspectrum.org/faq/reference/128kreference.htm)\n- [Z80 hardware organization](http://www.msxarchive.nl/pub/msx/mirrors/msx2.com/zaks/z80prg02.htm)\n- [disassembler.io](https://www.onlinedisassembler.com) online disassembler\n- Cool z80 assembler [zasm](http://k1.spdns.de/Develop/Projects/zasm-4.0/Distributions/)\n- Diagnostic ROM by [Phill](http://www.retroleum.co.uk/electronics-articles/a-diagnostic-rom-image-for-the-zx-spectrum/)\n- [zx-modules.de](http://www.zx-modules.de/) - great resource, check it out!\n- [speccy.info](http://speccy.info)\n- [Harlequin](http://www.zxdesign.info/harlequin.shtml)\n- [FUSE](http://fuse-emulator.sourceforge.net/) emulator source for finding out correct timings\n- [YAZE test suite](https://www.mathematik.uni-ulm.de/users/ag/yaze-ag/)\n- [z80test test suite](https://github.com/raxoft/z80test)\n- [ROM routines](https://skoolkid.github.io/rom/maps/routines.html)\n- And many other great material, which helped me to make rustzx!\n\n## ROMs\nEmulator contains ROMs, created by by Sinclair Research Ltd (now owned by Amstrad plc).\n\nAmstrad has [given](https://groups.google.com/forum/?hl=en#!msg/comp.sys.amstrad.8bit/HtpBU2Bzv_U/HhNDSU3MksAJ)\npermission to distribute their ROM's in conjunction with emulators.\n\nIn RustZX these ROMs are included in the source of the core emulator library `mod rustzx_core::zx::roms`. Embedded roms\ncan be opted-out from the core library by disabling feature `embedded-roms`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustzx%2Frustzx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frustzx%2Frustzx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frustzx%2Frustzx/lists"}