{"id":16001644,"url":"https://github.com/johanhelsing/ultra_crustaceous","last_synced_at":"2026-05-09T09:54:02.244Z","repository":{"id":77177964,"uuid":"531479351","full_name":"johanhelsing/ultra_crustaceous","owner":"johanhelsing","description":"Tools for making Ultra Zeus compatible roms in rust. And a sample emulator in js","archived":false,"fork":false,"pushed_at":"2022-09-26T19:11:59.000Z","size":107,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-10T09:43:19.485Z","etag":null,"topics":["bevy","fantasy-console","rust","wasm"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johanhelsing.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":"2022-09-01T11:00:08.000Z","updated_at":"2022-09-27T23:01:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"29584412-81f8-4313-91b2-d5bdbd52ba58","html_url":"https://github.com/johanhelsing/ultra_crustaceous","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/johanhelsing%2Fultra_crustaceous","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanhelsing%2Fultra_crustaceous/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanhelsing%2Fultra_crustaceous/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johanhelsing%2Fultra_crustaceous/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johanhelsing","download_url":"https://codeload.github.com/johanhelsing/ultra_crustaceous/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247273961,"owners_count":20912024,"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":["bevy","fantasy-console","rust","wasm"],"created_at":"2024-10-08T09:45:24.466Z","updated_at":"2026-05-09T09:53:57.201Z","avatar_url":"https://github.com/johanhelsing.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ultra Crustaceous\n\nThis repo contains open source sample games for the *Ultra Zeus* fantasy console\nemulator written in rust.\n\nIt also contains a sample emulator written in javascript.\n\n## Ultra Zeus spec\n\nUltra Zeus is a made up spec and interface for running old school games in an\nultra-portable and performant way.\n\nIt's built on top of web assembly modules, which means its games run extremely\nfast almost anywhere, including web browsers, Unity, C, C#, Rust etc.\n\nOn most platforms, a basic emulator can be written in roughly 100 lines of code.\n\nAn Ultra Zeus game, is simply a web assembly module that exports three functions:\n\n- `void update(i32 player_1, i32 player_2)`. Called once per frame by the\nemulator with the latest player input. This is where you should update your game\nstate.\n- `i32 get_screen_buffer_pointer()`. returns a pointer to where in the module's\nmemory the screen buffer is.\n- (optional) `i32 get_palette_buffer_pointer()`. returns a pointer to where in\nthe module's memory the current palette buffer is. If this is not exported, the\ndefault palette is used instead.\n\nThis means Ultra Zeus games can be *really* tiny, they are simply byte code with\nno extra libraries. The snake example is currently 29k.\n\nThat means you can even fit some roms in [a regular link](http://localhost:8000/index.html?url=data:application/wasm;base64,AGFzbQEAAAABCgJgAAF/YAJ/fwADBAMBAAAFAwEAEgdMBAZtZW1vcnkCABlnZXRfc2NyZWVuX2J1ZmZlcl9wb2ludGVyAAEaZ2V0X3BhbGV0dGVfYnVmZmVyX3BvaW50ZXIAAgZ1cGRhdGUAAAqJAQN3AQR/QQAhAUGAgMAAIQIDQCABQQpuIQNBACEAA0AgACACaiIEQQFqIAMgAEH//wNxQQpuc0F/c0EBcSIFOgAAIAQgBToAACAAQQJqIgBBwAJHDQALIAJBwAJqIQIgAUEBaiIBQfABRw0AC0GA2MQAQYCMGDYAAAsHAEGAgMAACwcAQYDYxAALAG8JcHJvZHVjZXJzAghsYW5ndWFnZQEEUnVzdAAMcHJvY2Vzc2VkLWJ5AwVydXN0Yx0xLjYzLjAgKDRiOTFhNmVhNyAyMDIyLTA4LTA4KQZ3YWxydXMGMC4xOS4wDHdhc20tYmluZGdlbgYwLjIuODI=)\nIt also means you can write games in any language that can target web assembly.\n\n### Graphics\n\nUltra Zeus graphics are inspired by 1990s home computers with low resolution\npixel graphics using a customizable palette.\n\n- The resolution is 320x240 (4:3)\n- The screen buffer is 320x240 = 76,800 bytes long\n- Each byte in the buffer is a palette index\n- Up to 32 palette colors are supported\n- Each palette color consist of 2 bytes.\n    - These bytes specifies red, blue and green components, with 4 bits per channel\n    - The bit arrangement is `(0000rrrr, ggggbbbb)`\n    - This means up to 2^12 = 4096 different colors are possible\n    - The 4 most significant bits of the red byte are reserved\n- This means the palette buffer is 32 * 2 = 64 bytes long\n\nSee the `checker_palette` example for a minimal example rom using palettes.\n\n### Audio\n\nTODO\n\n### Metadata\n\nTODO\n\n### Sample games\n\nSee the `ultra_snake` folder for a complete example using rust to implement a\ncomplete game with input and graphics.\n\nThe samples can be built by running `cargo xtask dist \u003cgame_name\u003e`.\n\n### Emulators\n\nAn example/reference emulator written for web is included in `index.html`.\n\nIt uses simple vanilla js with no extra dependencies.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanhelsing%2Fultra_crustaceous","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohanhelsing%2Fultra_crustaceous","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohanhelsing%2Fultra_crustaceous/lists"}