{"id":13612556,"url":"https://github.com/georgik/rustzx-esp32","last_synced_at":"2025-07-09T17:37:56.247Z","repository":{"id":37919646,"uuid":"426669776","full_name":"georgik/rustzx-esp32","owner":"georgik","description":"ESP32 implementation of RustZX Spectrum emulator","archived":false,"fork":false,"pushed_at":"2024-01-31T08:16:22.000Z","size":535,"stargazers_count":38,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-31T04:51:24.533Z","etag":null,"topics":["devcontainers","esp32","esp32c3","esp32s2","esp32s3","gitpod-compatible","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/georgik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2021-11-10T15:14:18.000Z","updated_at":"2024-11-09T09:07:19.000Z","dependencies_parsed_at":"2024-09-18T22:08:30.195Z","dependency_job_id":null,"html_url":"https://github.com/georgik/rustzx-esp32","commit_stats":{"total_commits":124,"total_committers":5,"mean_commits":24.8,"dds":"0.33870967741935487","last_synced_commit":"88e1e466b71eb83e304bb7d1c9a77ecd855410a7"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Frustzx-esp32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Frustzx-esp32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Frustzx-esp32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/georgik%2Frustzx-esp32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/georgik","download_url":"https://codeload.github.com/georgik/rustzx-esp32/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238053514,"owners_count":19408699,"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":["devcontainers","esp32","esp32c3","esp32s2","esp32s3","gitpod-compatible","rust"],"created_at":"2024-08-01T20:00:31.555Z","updated_at":"2025-07-09T17:37:56.229Z","avatar_url":"https://github.com/georgik.png","language":"Rust","funding_links":[],"categories":["Projects"],"sub_categories":["`std`"],"readme":"# RustZX for ESP32\n\nRust Bare Metal implementation of ZX Spectrum for ESP32.\nThe project is still work in progress.\n\nHardware (working):\n- ZX Spectrum with USB keyboard over ESP-NOW (wireless)\n  - [ESP32-S3-BOX](https://github.com/espressif/esp-box), [M5Stack CoreS3](https://shop.m5stack.com/products/) or [ESP32-C6-DevKitC-1](https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html) as main emulator unit with display\n  - [ESP32-S3-USB-OTG](https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_usb_otg) as USB keyboard to ESP-NOW converter (wireless) (ESP-IDF)\n- ZX Spectrum with UART keyboard over `espflash monitor`\n  - [ESP32-C6-DevKitC-1](https://docs.espressif.com/projects/espressif-esp-dev-kits/en/latest/esp32c6/esp32-c6-devkitc-1/index.html) as main emulator unit with display\n- ZX Spectrum PS/2 keyboard over UART (wired)\n  - [M5Stack CoreS3](https://shop.m5stack.com/products/m5stack-cores3-esp32s3-lotdevelopment-kit) as main emulator unit with display\n  - [ESP32-C3 DevKit](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/hw-reference/esp32c3/user-guide-devkitm-1.html) as PS/2 or USB COMBO keyboard converter to serial\n\nHardware (work-in-progress):\n- [ESP32 C3 DevKit RUST](https://github.com/esp-rs/esp-rust-board) - app is not yet optimized for low memory\n\n## ZX Spectrum with USB keyboard over ESP-NOW (wireless)\n\n### Assembly\n\n#### Assembly of the keyboard\n\n**Power Configuration:**\n- **USB DEV port (USB-A Male)**: Connect main power USB cable here - powers the board and USB Host devices\n- **USB-UART port (USB-C)**: Connect separate programming cable here - used only for flashing and monitoring\n- **USB HOST port (USB-A Female)**: Connect your USB keyboard here - receives power from USB DEV port automatically\n\n**Assembly Steps:**\n- Plug USB keyboard into ESP32-S3-USB-OTG **USB HOST connector** (USB-A Female)\n- Connect power USB cable to ESP32-S3-USB-OTG **USB DEV connector** (USB-A Male) - this powers everything\n- Connect programming USB cable to **USB-UART port** (USB-C) for flashing\n\n#### Flashing keyboard\n\n- use ESP-IDF 5.5\n```\ncd esp32-s3-usb-otg-keyboard\nidf.py reconfigure\nidf.py build flash monitor\n```\n- code is based on [ESP-IDF USB HID example](https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/hid)\n\n**Note:** The firmware automatically configures power routing from USB DEV port to USB HOST port, so you only need one power cable for the entire setup. The USB-UART port cannot power USB Host devices due to hardware limitations.\n\n### Assembly of the main part\n\n- connect ESP32-S3-BOX or M5Stack CoreS3 with USB-C to computer and flash the application\n\n## Software setup\n\n- use [espup](https://github.com/esp-rs/espup) to install Rust toolchain for Xtensa (ESP32-S3)\n```\nespup install\n```\n- use [espflash](https://github.com/esp-rs/espflash) to flash binaries\n```\ncargo install espflash\n```\n- download a `.tap` file from Speccy archives and store it to `data/hello.tap`\n\n## Run\n\nFlash and monitor the application.\n\nESP32-S3-BOX:\n```\ncd esp32-s3-box\ncargo run --release\n```\n\nM5Stack CoreS3:\n```\ncd m5stack-cores3\ncargo run --release\n```\n\nESP32-C6-DevKitC-1:\n```\ncd esp32-c6\ncargo run --release\n```\n\n## ZX Spectrum with UART keyboard over `espflash monitor`\n\n## Software setup\n\n- use [espup](https://github.com/esp-rs/espup) to install Rust toolchain for Xtensa (ESP32-S3)\n```\nespup install\n```\n- use [espflash](https://github.com/esp-rs/espflash) to flash binaries\n```\ncargo install espflash\n```\n- download a `.tap` file from Speccy archives and store it to `data/hello.tap`\n\n## Run\n\nFlash and monitor the application.\n\nESP32-C6-DevKitC-1:\n```\ncd esp32-c6\ncargo run --release\n```\n\nCommand `cargo run --release` will turn on `espflash monitor` after the flashing.\nYou can use the monitor console as kkeyboard output.\n\n\n## ZX Spectrum PS/2 keyboard over UART (wired)\n\n### Assembly\n\n#### Assmebly of the keyboard\n\n- flash ESP32-C3 which should serve as keyboard converter from [PS/2 or USB to serial](https://georgik.rocks/how-to-connect-usb-and-ps-2-keyboards-to-esp32-with-rust/)\n```\ngit clone https://github.com/georgik/ps2keyboard-esp32c3.git --branch feature/serial-converter\ncd ps2keyboard-esp32c3\ncargo run --release\n```\n- take PS/2 keyboard and wire it to ESP32-C3 according to [PS/2 ESP32-C3 circuit](https://github.com/georgik/ps2keyboard-esp32c3/tree/feature/serial-converter?tab=readme-ov-file#circuit)\n- in case of USB keyboard you can skip PS/2 connector and wire[PS/2 ESP32-C3 circuit](https://github.com/georgik/ps2keyboard-esp32c3/tree/feature/serial-converter?tab=readme-ov-file#circuit) to USB connector using the schematics from [USB to PS2 convertor](https://www.instructables.com/USB-to-PS2-convertor/)\n- recommendation: use [wire wrapping](https://youtu.be/L-463vchW0o?si=MtQrXpbTJznikXSJ) to connect parts\n\n### Assembly of the main part\n\n- connect ESP32-C3 keyboard converter and M5Stack CoreS3\n```\nGPIO4 RX (ESP32-C3 KB) - GPIO17 TX or T at Grove Port C (M5Stack CoreS3)\nGPIO5 TX (ESP32-C3 KB) - GPIO18 RX or R at Grove Port C (M5Stack CoreS3)\nGND (ESP32-C3 KB) - GND (M5Stack CoreS3)\n```\n\n## Software setup\n\n- use [espup](https://github.com/esp-rs/espup) to install Rust toolchain for Xtensa (ESP32-S3)\n```\nespup install\n```\n- use [espflash](https://github.com/esp-rs/espflash) to flash binaries\n```\ncargo install espflash\n```\n- download a `.tap` file from Speccy archives and store it to `data/hello.tap`\n\n## Run\n\nFlash and monitor the application:\n```\ncd m5stack-cores3-ps2-keyboard\ncargo run --release\n```\n\nHit enter to load the tape included in the memory.\n\n## References\n\n- RustZX wrapper code reused from https://github.com/pacmancoder/rustzx\n- [ESP-IDF USB HID example](https://github.com/espressif/esp-idf/tree/master/examples/peripherals/usb/host/hid)\n- [Rust ESP-NOW](https://github.com/esp-rs/esp-wifi)\n- older RustZX-ESP32 based with std on [v1.0.0-archive](https://github.com/georgik/rustzx-esp32/tree/v1.0.0-archive)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgik%2Frustzx-esp32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeorgik%2Frustzx-esp32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeorgik%2Frustzx-esp32/lists"}