{"id":13621901,"url":"https://github.com/binji/pokegb","last_synced_at":"2025-05-16T07:05:52.575Z","repository":{"id":46896421,"uuid":"371753644","full_name":"binji/pokegb","owner":"binji","description":"A gameboy emulator that only plays Pokemon Blue, in ~50 lines of c++.","archived":false,"fork":false,"pushed_at":"2024-02-12T19:01:55.000Z","size":4220,"stargazers_count":1351,"open_issues_count":4,"forks_count":49,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-08T16:09:13.746Z","etag":null,"topics":["emulator","gameboy","obfuscated","pokemon"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binji.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":"2021-05-28T16:04:43.000Z","updated_at":"2025-04-08T03:11:08.000Z","dependencies_parsed_at":"2024-08-01T21:54:20.365Z","dependency_job_id":null,"html_url":"https://github.com/binji/pokegb","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/binji%2Fpokegb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fpokegb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fpokegb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binji%2Fpokegb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binji","download_url":"https://codeload.github.com/binji/pokegb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485062,"owners_count":22078767,"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":["emulator","gameboy","obfuscated","pokemon"],"created_at":"2024-08-01T21:01:11.825Z","updated_at":"2025-05-16T07:05:47.549Z","avatar_url":"https://github.com/binji.png","language":"C++","funding_links":[],"categories":["C++"],"sub_categories":[],"readme":"# pokegb\n\nA gameboy emulator that only plays Pokemon Blue, in ~50 lines of c++.\n\nSee the [technical write-up](https://binji.github.io/posts/pokegb/).\n\n## Features\n\nPlays Pokemon Blue (and Red).\n\n## Screenshots\n\n![1](img/o1.gif)\n![2](img/o2.gif)\n![3](img/o3.gif)\n![4](img/o4.gif)\n![5](img/o5.gif)\n![6](img/o6.gif)\n![7](img/o7.gif)\n![8](img/o8.gif)\n![9](img/o9.gif)\n![10](img/o10.gif)\n![11](img/o11.gif)\n\n![Source Code](img/pokegb.png)\n\n## Building\n\nOnly builds on Linux and macOS AFAIK.\n\n```\n$ make\n```\n\nOn macOS, you'll need to create a save file too (just the first time):\n\n```\n$ make rom.sav\n```\n\n## Running\n\nGet a Pokemon Blue (or Pokemon Red) ROM file. The files that are known to work have the following sha1s:\n\n| Name | sha1 |\n| - | - |\n| Pokemon - Blue Version (USA, Europe) (SGB Enhanced).gb | `d7037c83e1ae5b39bde3c30787637ba1d4c48ce2` |\n| Pokemon - Red Version (USA, Europe) (SGB Enhanced).gb | `ea9bcae617fdf159b045185467ae58b2e4a48b9a` |\n\nOthers might work too, but these are the ones that I've tried.\n\nRename the file to `rom.gb` and put it in the current directory. Then run:\n\n```\n$ ./pokegb\n```\n\nThe save file is written to `rom.sav`.\n\nKeys:\n\n| Action | Key |\n| --- | --- |\n| DPAD-UP | \u003ckbd\u003e↑\u003c/kbd\u003e |\n| DPAD-DOWN | \u003ckbd\u003e↓\u003c/kbd\u003e |\n| DPAD-LEFT | \u003ckbd\u003e←\u003c/kbd\u003e |\n| DPAD-RIGHT | \u003ckbd\u003e→\u003c/kbd\u003e |\n| B | \u003ckbd\u003eZ\u003c/kbd\u003e |\n| A | \u003ckbd\u003eX\u003c/kbd\u003e |\n| START | \u003ckbd\u003eEnter\u003c/kbd\u003e |\n| SELECT | \u003ckbd\u003eTab\u003c/kbd\u003e |\n\n## Updating keys\n\nLook for [line 24](https://github.com/binji/pokegb/blob/5444936aa7f12cb8c5c9c78e3c0c391ca4102f9b/pokegb.cc#L24) the source.\nThe following table shows which numbers map to which keyboard keys:\n\n| number | default key | gameboy button |\n| - | - | - |\n| 27 | X | A Button |\n| 29 | Z | B Button |\n| 43 | Tab | Select Button |\n| 40 | Return | Start Button |\n| 79 | Arrow Right | DPAD Right |\n| 80 | Arrow Left | DPAD Left |\n| 81 | Arrow Down | DPAD Down |\n| 82 | Arrow Up | DPAD Up |\n\nReplace the numbers on this line with one from the [SDL scancode list](https://www.libsdl.org/tmp/SDL/include/SDL_scancode.h).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinji%2Fpokegb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinji%2Fpokegb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinji%2Fpokegb/lists"}