{"id":18823928,"url":"https://github.com/h1romas4/m5stack-chipstream","last_synced_at":"2025-04-11T11:15:08.504Z","repository":{"id":65953246,"uuid":"602544008","full_name":"h1romas4/m5stack-chipstream","owner":"h1romas4","description":"This is a test to port C++'s ymfm and Rust's vgmplay to ESP32(Xtensa). ","archived":false,"fork":false,"pushed_at":"2023-10-13T02:53:21.000Z","size":362,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T07:36:17.803Z","etag":null,"topics":["esp-idf-sys","esp32","i2s","m5stack","pcm5102a","rust","vgmplay"],"latest_commit_sha":null,"homepage":"https://another.maple4ever.net/archives/3242/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/h1romas4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-02-16T12:44:56.000Z","updated_at":"2024-11-11T16:03:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"8de6c1ea-f6d5-44de-bb00-7631e24e9671","html_url":"https://github.com/h1romas4/m5stack-chipstream","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h1romas4%2Fm5stack-chipstream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h1romas4%2Fm5stack-chipstream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h1romas4%2Fm5stack-chipstream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h1romas4%2Fm5stack-chipstream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h1romas4","download_url":"https://codeload.github.com/h1romas4/m5stack-chipstream/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248381789,"owners_count":21094528,"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":["esp-idf-sys","esp32","i2s","m5stack","pcm5102a","rust","vgmplay"],"created_at":"2024-11-08T00:55:03.330Z","updated_at":"2025-04-11T11:15:08.482Z","avatar_url":"https://github.com/h1romas4.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  m5stack-chipstream\n\n![](https://github.com/h1romas4/m5stack-chipstream/workflows/Build/badge.svg)\n\nThis is a test to port [C++'s ymfm and Rust's vgmplay](https://github.com/h1romas4/libymfm.wasm) to ESP32(Xtensa).\n\nStill slow and impractical, depending on the sound chip you choose.\n\n## Environment\n\n- [M5Stack Core2](https://docs.m5stack.com/en/core/core2) (ESP32 PSRAM 4MB+4MB)\n- [M5Stack RCA Module](https://docs.m5stack.com/ja/module/RCA%20Module%2013.2) (I2S PCM5102APWR)\n\n## Demo\n\n![Main Board](https://raw.githubusercontent.com/h1romas4/m5stack-chipstream/main/docs/images/chipstream-01.jpg)\n\n🎥 https://twitter.com/h1romas4/status/1629345305861947393\n\n## TODO\n\n- [x] The transfer of PCM waveforms from Rust to C is shifted depending on the memory state. (Is it due to int16_t alignment?)\n- [x] I may be using the ring buffer or I2S DMA incorrectly. The process slows down from the same time, independent of the waveform generation process time.\n- [ ] Player control is not complete. May stop when transitioning to next song.\n- [ ] There is no interface to stop playback.\n\n## Build\n\n@see [.github/workflows/build.yml](https://github.com/h1romas4/m5stack-chipstream/blob/main/.github/workflows/build.yml#L26-L59)\n\n### Setup\n\n- [Setup ESF-IDF v4.4.6](https://docs.espressif.com/projects/esp-idf/en/v4.4.6/esp32/get-started/index.html#installation-step-by-step)\n\nget_idf\n\n```\nalias get_idf='. $HOME/esp/esp-idf/export.sh'\n```\n\n```\n$ get_idf\nDetecting the Python interpreter\n... snip ...\nDone! You can now compile ESP-IDF projects.\nGo to the project directory and run:\n\n  idf.py build\n\n$ echo ${IDF_PATH}\n/home/hiromasa/devel/toolchain/esp/esp-idf\n\n$ xtensa-esp32-elf-gcc -v\nUsing built-in specs.\nCOLLECT_GCC=xtensa-esp32-elf-gcc\nCOLLECT_LTO_WRAPPER=/home/hiromasa/.espressif/tools/xtensa-esp32-elf/esp-2021r2-patch3-8.4.0/xtensa-esp32-elf/bin/../libexec/gcc/xtensa-esp32-elf/8.4.0/lto-wrapper\nlto-wrapper\nTarget: xtensa-esp32-elf\n... snip ...\nThread model: posix\ngcc version 8.4.0 (crosstool-NG esp-2021r2-patch5)\n```\n\n- Setup Rust Xtensa toolchain\n\nhttps://github.com/esp-rs/espup\n\n```\ncurl -L https://github.com/esp-rs/espup/releases/latest/download/espup-x86_64-unknown-linux-gnu -o espup\nchmod a+x espup\n./espup install --toolchain-version 1.71.0.1\n```\n\n```\ncat ~/export-esp.sh\nexport LIBCLANG_PATH=\"/home/hiromasa/.rustup/toolchains/esp/xtensa-esp32-elf-clang/esp-16.0.0-20230516/esp-clang/lib\"\n```\n\n```\n$ ls -laF ~/.rustup/toolchains/esp/\n合計 28\ndrwxrwxr-x 7 hiromasa hiromasa 4096  2月 14 20:56 ./\ndrwxrwxr-x 9 hiromasa hiromasa 4096  2月 14 20:55 ../\ndrwxr-xr-x 2 hiromasa hiromasa 4096  2月 14 20:56 bin/\ndrwxr-xr-x 3 hiromasa hiromasa 4096  2月 14 20:56 etc/\ndrwxr-xr-x 3 hiromasa hiromasa 4096  2月 14 20:56 lib/\ndrwxr-xr-x 2 hiromasa hiromasa 4096  2月 14 20:56 libexec/\ndrwxr-xr-x 5 hiromasa hiromasa 4096  2月 14 20:56 share/\n$ ~/.rustup/toolchains/esp/bin/rustc -V\nrustc 1.71.0-nightly (4ca000ac8 2023-07-13) (1.71.0.1)\n```\n\n```\n$ ls -laF ~/.espressif/tools/xtensa-esp32-elf-clang/\n合計 12\ndrwxrwxr-x  3 hiromasa hiromasa 4096  2月 14  2023 ./\ndrwxrwxr-x 15 hiromasa hiromasa 4096  2月 28 22:14 ../\ndrwxrwxr-x  3 hiromasa hiromasa 4096  2月 14  2023 esp-15.0.0-20221201-x86_64-unknown-linux-gnu/\n```\n\n### Compile and Flash\n\n1. git clone and build\n\n```\ngit clone --recursive https://github.com/h1romas4/m5stack-chipstream\ncd m5stack-chipstream\nidf.py build\n```\n\n2. Restart M5Stack Core 2\n\n```\nidf.py flash monitor\n```\n\n## Dependencies\n\nThanks for all the open source.\n\n|Name|Version|License|\n|-|-|--|\n|[esp-idf](https://docs.espressif.com/projects/esp-idf/en/release-v4.4/esp32/get-started/index.html)|`v4.4.6`|BSD License|\n|[arduino-esp32](https://github.com/espressif/arduino-esp32)|`2.0.14`|LGPL-2.1 License|\n|[M5Core2](https://github.com/m5stack/M5Core2)|`0.1.6`|MIT License|\n|[M5EPD](https://github.com/m5stack/M5EPD)|`0.1.5`|MIT License|\n|[M5GFX](https://github.com/m5stack/M5GFX)|`0.1.9`|MIT license|\n|[ymfm](https://github.com/aaronsgiles/ymfm)|`d641a806`|BSD-3-Clause license|\n|[libymfm.wasm](https://github.com/h1romas4/libymfm.wasm)|`v0.16.0`|BSD-3-Clause license (include MAME's soundchip ports)|\n\n## License\n\nBSD-3-Clause License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh1romas4%2Fm5stack-chipstream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh1romas4%2Fm5stack-chipstream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh1romas4%2Fm5stack-chipstream/lists"}