{"id":16916113,"url":"https://github.com/zesterer/gba-test","last_synced_at":"2025-11-04T16:30:20.267Z","repository":{"id":66134583,"uuid":"391039908","full_name":"zesterer/gba-test","owner":"zesterer","description":"Software rasterisation on the GBA in Rust. Some experiments from a while ago.","archived":false,"fork":false,"pushed_at":"2021-07-31T20:08:34.000Z","size":34,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T09:27:40.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zesterer.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}},"created_at":"2021-07-30T11:27:08.000Z","updated_at":"2024-07-09T22:01:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"d121a8ab-b043-4323-9752-35941f411289","html_url":"https://github.com/zesterer/gba-test","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/zesterer%2Fgba-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fgba-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fgba-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zesterer%2Fgba-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zesterer","download_url":"https://codeload.github.com/zesterer/gba-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239435998,"owners_count":19638242,"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":[],"created_at":"2024-10-13T19:25:02.141Z","updated_at":"2025-11-04T16:30:20.225Z","avatar_url":"https://github.com/zesterer.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Written in Rust, of course. I didn't end up getting round to implementing texture mapping.\n\n[![Software Rasterisation on the GBA](https://img.youtube.com/vi/qpUQId1efQU/0.jpg)](https://www.youtube.com/watch?v=qpUQId1efQU)\n\nThe GBA has a 16 MHz processor and a 240x160 screen. With mode 5 rendering and a graphics hardware scaling hack, you can\ndo full-screen 16-bit colour rendering (with an internal resolution of 160x128). The GBA doesn't have a GPU, so\neverything needs to be done with software. I wrote an optimised rasteriser that supports blitting N-gons to the screen,\nalong with a full rendering pipeline to go with it. At 16 MHz and with a screen with of 160x128, you only get\n`16000000 / (60 * 160 * 128) ~= 13` cycles for each pixel, and that's not considering the time required to transform\nvertices, clear the screen for the next frame, listen to user inputs, etc. In practice, most instructions require\nseveral cycles and the GBA has no hardware parallelism (except for some very primitive block memory copy hardware). All\nthings considered, the frame budget can dip down to about ~5 instructions per pixel. In addition, the GBA has no\nfloating-point instructions so everything needs to be done using fixed-point maths. A fun challenge!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzesterer%2Fgba-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzesterer%2Fgba-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzesterer%2Fgba-test/lists"}