{"id":20658538,"url":"https://github.com/gergoerdi/chirp8-avr","last_synced_at":"2025-10-14T23:45:53.167Z","repository":{"id":66977997,"uuid":"90978586","full_name":"gergoerdi/chirp8-avr","owner":"gergoerdi","description":"CHIP-8 implementation in Rust targeting AVR microcontrollers","archived":false,"fork":false,"pushed_at":"2024-09-30T02:41:09.000Z","size":118,"stargazers_count":49,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-01T12:58:39.477Z","etag":null,"topics":["arduino","avr","chip8","chip8-interpreter","microcontroller","rust"],"latest_commit_sha":null,"homepage":"https://gergo.erdi.hu/blog/2017-05-12-rust_on_avr__beyond_blinking/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gergoerdi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2017-05-11T12:49:52.000Z","updated_at":"2025-04-17T10:27:04.000Z","dependencies_parsed_at":"2024-11-16T18:37:39.191Z","dependency_job_id":null,"html_url":"https://github.com/gergoerdi/chirp8-avr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gergoerdi/chirp8-avr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergoerdi%2Fchirp8-avr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergoerdi%2Fchirp8-avr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergoerdi%2Fchirp8-avr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergoerdi%2Fchirp8-avr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gergoerdi","download_url":"https://codeload.github.com/gergoerdi/chirp8-avr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gergoerdi%2Fchirp8-avr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271444208,"owners_count":24760746,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["arduino","avr","chip8","chip8-interpreter","microcontroller","rust"],"created_at":"2024-11-16T18:26:53.708Z","updated_at":"2025-10-14T23:45:53.107Z","avatar_url":"https://github.com/gergoerdi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CHIP-8 implementation for a very simple breadboard toy\n\nThis is a CHIP-8 virtual machine implementation running on AVR. \n\nIts big party trick is that **it is written in Rust**: back in 2017,\nit was the first non-trivial Rust application running on AVR. You can\nread about its development process in [my blog post][blog]. The CHIP-8\nVM itself is implemented in a [separate, portable crate][chirp8-engine] \nwritten in idiomatic Rust fashion, heavily using algebraic data types\nand pattern matching; this crate can then be used both to build\nan [SDL-based desktop app][chirp8-sdl] and also this crate running on\nAVR microcontrollers.\n\nThe intended hardware is a simple circuit with very few components:\n\n* AVR ATMega328P microcontroller\n* PCD8544 84x48 monochrome LCD\n* Microchip 23K640 serial RAM\n* 4x4 keypad\n* 10K resistors (4 pcs)\n* 10K trimpot\n\nAll of these components come in throughhole versions so it is very\neasy to build it on a breadboard. **NOTE THE RAM CHIP DOESN'T SUPPORT\n5 Volts. The board is meant to be powered at 3.3 Volts.** An Arduino\nUno is going to fry the RAM chip.\n\n![Schematics](board-schematics.png)\n![Photo of breadboard version](https://gergo.erdi.hu/blog/2017-05-12-rust_on_avr__beyond_blinking/chip328.jpg)\n\n# Building\n\nAVR support in Rust is not yet available its mainline version, so you\nhave to use a recent nightly. To override the default Rust version\nlocally in this directory, use `rustup override`:\n\n```\n$ rustup override set nightly-2024-01-01\n$ rustup component add rust-src --toolchain nightly-2024-01-01\n```\n\nYou can find more information about the installation procedure in\n[The AVR-Rust Guidebook](https://book.avr-rust.com/002-installing-the-compiler.html).\n\nAt this point, you can build `chirp8-avr` and its\ndependencies. The Rust compiler seems to have trouble building in\ndebug mode, so only release builds are supported for now:\n\n```\n$ cargo build --release\n```\n\n# Running\n\nThe above process will result in the AVR ELF executable\n`target/avr-atmega328p/release/chirp8-avr.elf`. We can\nconvert this into the `.hex` format used by [`avrdude`][avrdude] and\nsimlar uploaders using `avr-objcopy`:\n\n```\n$ avr-objcopy -Oihex -R.eeprom \\\n    target/avr-atmega328p/release/chirp8-avr.elf\n    target/avr-atmega328p/release/chirp8-avr.hex\n```\n\nThis hex file can be uploaded to the ATMega328P via an AVR programmer;\nor if you use something like an Arduino Pro 3.3V or an Adafruit\nTrinket Pro 3.3V, you can upload it directly via USB.\n\nAnother way of trying it out is simulation: I've implemented\na [SimAVR-based simulator][simavr] for the above schematics that\nalmost runs in real time, as an interactive SDL app.\n\n\n[blog]: https://gergo.erdi.hu/blog/2017-05-12-rust_on_avr__beyond_blinking/\n[chirp8-engine]: https://github.com/gergoerdi/chirp8-engine\n[chirp8-sdl]: https://github.com/gergoerdi/chirp8-sdl\n[xargo-rustup]: https://github.com/japaric/xargo/issues/138\n[simavr]: https://github.com/gergoerdi/chirp8-avr-simulator\n[avrdude]: https://www.nongnu.org/avrdude/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgergoerdi%2Fchirp8-avr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgergoerdi%2Fchirp8-avr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgergoerdi%2Fchirp8-avr/lists"}