{"id":13712163,"url":"https://github.com/andrewrk/clashos","last_synced_at":"2025-08-20T08:33:04.474Z","repository":{"id":66013642,"uuid":"80873695","full_name":"andrewrk/clashos","owner":"andrewrk","description":"multiplayer arcade game for bare metal Raspberry Pi 3 B+","archived":false,"fork":false,"pushed_at":"2020-01-26T14:50:06.000Z","size":2743,"stargazers_count":219,"open_issues_count":1,"forks_count":19,"subscribers_count":15,"default_branch":"master","last_synced_at":"2024-12-09T08:52:09.671Z","etag":null,"topics":["aarch64","kernel","raspberry-pi","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/andrewrk.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}},"created_at":"2017-02-03T22:09:14.000Z","updated_at":"2024-11-14T15:43:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"ca684061-e916-4a9c-9bfe-9346962b786e","html_url":"https://github.com/andrewrk/clashos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewrk%2Fclashos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewrk%2Fclashos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewrk%2Fclashos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewrk%2Fclashos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewrk","download_url":"https://codeload.github.com/andrewrk/clashos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230408171,"owners_count":18220974,"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":["aarch64","kernel","raspberry-pi","zig"],"created_at":"2024-08-02T23:01:15.542Z","updated_at":"2024-12-19T09:07:46.199Z","avatar_url":"https://github.com/andrewrk.png","language":"Zig","funding_links":[],"categories":["Applications","Multimedia \u0026 Graphics","Games"],"sub_categories":["Game Development"],"readme":"# ClashOS\n\nA work-in-progress multiplayer arcade game that runs directly on the\nRaspberry Pi 3 B+ hardware, written entirely in [Zig](https://ziglang.org/).\n\n## Current Status\n\n\"Hello World\" OS using the MiniUART. ~Tested and working on real hardware.~\nIt has regressed on real hardware, and I haven't fixed it yet.\n\n## Building\n\n```\nzig build\n```\n\n## Testing\n\n### QEMU\n\n```\nzig build qemu\n```\n\n#### Debugging with GDB\n\n```\nzig build qemu -Dgdb\n```\n\nIn another terminal:\n\n```\ngdb zig-cache/clashos-dbg -ex 'target remote localhost:1234'\n```\n\n### Sending a New Kernel Image via Serial\n\nWhile the Raspberry Pi is running, you can use\n\n```\nzig build upload -Dtty=/dev/ttyUSB0\n```\n\nIf using QEMU, use `zig build qemu -Dpty` and note the tty path.\nIn another terminal window, `cat` the tty path.\nIn yet another terminal window, you can use the `zig build upload`\ncommand above, with the tty path provided by QEMU.\nThis is compatible with using GDB with QEMU, just make sure to pass\nthe `-Dgdb` to both `zig build` commands.\n\n### Actual Hardware\n\n1. Mount an sdcard with a single FAT32 partition.\n2. Copy `boot/*` to `/path/to/sdcard/*`.\n3. `zig build`\n4. Copy `clashos.bin` to `/path/to/sdcard/kernel7.img`.\n\nFor further changes repeat steps 3 and 4.\n\n## Roadmap\n\n * Interface with the file system\n * Get rid of dependency on binutils objcopy\n * Interface with the video driver\n * Get a simple joystick and button and use GPIO\n * Sound (should it be the analog or over HDMI)?\n * Make the game\n * Build arcade cabinets\n\n## Documentation\n\n### EZSync 012 USB Cable\n\n * Black: Pin 6, Ground\n * Yellow: Pin 8, BCM 14, TXD / Transmit\n * Orange: Pin 10, BCM 15, RXD / Receive\n\n### How to view the serial data\n\nWhere `/dev/ttyUSB0` is the device that represents the serial-to-USB cable:\n\n```\nsudo screen /dev/ttyUSB0 115200 cs8\n```\n\n### Memory Layout\n\n```\n0x0000000 (  0 MiB) - boot entry point\n0x0001000           - shortExceptionHandlerAt0x1000 function\n0x0001100           - kernelMainAt0x1100 function\n0x8000000 (128 MiB) - top of kernel stack, and bootloader_main function\n0x8800000 (136 MiB) - top of bootloader stack\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewrk%2Fclashos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewrk%2Fclashos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewrk%2Fclashos/lists"}