{"id":13577711,"url":"https://github.com/trekawek/coffee-gb","last_synced_at":"2025-05-16T10:06:28.077Z","repository":{"id":41176435,"uuid":"78204995","full_name":"trekawek/coffee-gb","owner":"trekawek","description":"Gameboy emulator in Java 8.","archived":false,"fork":false,"pushed_at":"2024-03-06T21:28:23.000Z","size":4545,"stargazers_count":1121,"open_issues_count":1,"forks_count":82,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-09T04:06:25.271Z","etag":null,"topics":["emulator","gameboy","gameboy-emulator","z80"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/trekawek.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}},"created_at":"2017-01-06T12:38:41.000Z","updated_at":"2025-04-08T07:22:02.000Z","dependencies_parsed_at":"2024-01-16T20:29:05.112Z","dependency_job_id":"27534c4c-75bd-4934-b077-24aad007990c","html_url":"https://github.com/trekawek/coffee-gb","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trekawek%2Fcoffee-gb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trekawek%2Fcoffee-gb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trekawek%2Fcoffee-gb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trekawek%2Fcoffee-gb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trekawek","download_url":"https://codeload.github.com/trekawek/coffee-gb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509475,"owners_count":22082891,"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","gameboy-emulator","z80"],"created_at":"2024-08-01T15:01:23.771Z","updated_at":"2025-05-16T10:06:28.054Z","avatar_url":"https://github.com/trekawek.png","language":"Java","funding_links":[],"categories":["Handheld game console emulators","Java","游戏开发"],"sub_categories":["Nintendo Handhelds","文件同步"],"readme":"# Coffee GB\n\nCoffee GB is a Gameboy Color emulator written in Java 8. It's meant to be a development exercise. More info can be found in the blog post [Why did I spend 1.5 months creating a Gameboy emulator?](http://blog.rekawek.eu/2017/02/09/coffee-gb/)\n\n![Coffee GB running game](doc/tetris.gif)\n\n## Building\n\nThe emulator can be build with [Maven](https://maven.apache.org/):\n\n    mvn clean package\n\nThe coffee-gb-*-complete.jar executable file will be available in the `./target` directory.\n\n## Usage\n\n1. Download the [most recent release](https://github.com/trekawek/coffee-gb/releases/download/coffee-gb-1.2.0/coffee-gb-1.2.0.jar).\n2. Double-click the JAR or launch it with `java -jar coffee-gb-*.jar` command.\n3. Load a game.\n\nPlay with \u003ckbd\u003e\u0026larr;\u003c/kbd\u003e, \u003ckbd\u003e\u0026uarr;\u003c/kbd\u003e, \u003ckbd\u003e\u0026darr;\u003c/kbd\u003e, \u003ckbd\u003e\u0026rarr;\u003c/kbd\u003e, \u003ckbd\u003eZ\u003c/kbd\u003e, \u003ckbd\u003eX\u003c/kbd\u003e, \u003ckbd\u003eEnter\u003c/kbd\u003e, \u003ckbd\u003eBackspace\u003c/kbd\u003e.\n\n## Features\n\n* Cycle-exact Gameboy CPU emulation. Each opcode is split into a few micro-operations (load value from memory, store it to register, etc.) and each micro-operation is run in a separate CPU cycle.\n* Quite compatible (all the Blargg's tests are passed, although some game still doesn't work)\n* GPU\n* Joypad\n* Timer\n* Sound\n* MBC1-5 support\n* Battery saves\n* Support for zipped ROMs\n* ROM-based compatibility tests run from Maven\n\n## Running Blargg's tests\n\nThe [Blargg's test ROMs](http://gbdev.gg8.se/wiki/articles/Test_ROMs) are used for testing the compatibility. Tests can be launched from Maven using appropriate profile:\n\n    mvn clean test -Ptest-blargg\n    mvn clean test -Ptest-blargg-individual # for running \"single\" tests providing more diagnostic info\n\nThey are also part of the [Travis-based CI](https://travis-ci.org/trekawek/coffee-gb).\n\nThe tests output (normally displayed on the Gameboy screen) is redirected to the stdout:\n\n```\ncpu_instrs\n\n01:ok  02:ok  03:ok  04:ok  05:ok  06:ok  07:ok  08:ok  09:ok  10:ok  11:ok\n\nPassed all tests\n```\n\nCoffee GB passes all the tests:\n\n* cgb_sound\n* cpu_instrs\n* dmg_sound-2\n* halt_bug\n* instr_timing\n* interrupt_time\n* mem_timing-2\n* oam_bug-2\n\n## Mooneye tests\n\nThe [Mooneye GB](https://github.com/Gekkio/mooneye-gb) emulator comes with a great set of test ROMs. They can be used to test the Coffee GB as well. Use -Ptest-mooneye profile:\n\n    mvn clean test -Ptest-mooneye\n\n## Screenshots\n\n![Coffee GB running game](doc/screenshot1.png)\n![Coffee GB running game](doc/screenshot2.png)\n![Coffee GB running game](doc/screenshot3.png)\n![Coffee GB running game](doc/screenshot4.png)\n![Coffee GB running game](doc/screenshot5.png)\n![Coffee GB running game](doc/screenshot6.png)\n![Coffee GB running game](doc/screenshot7.png)\n![Coffee GB running game](doc/screenshot8.png)\n![Coffee GB running game](doc/screenshot9.png)\n![Coffee GB running game](doc/screenshot10.png)\n\n## Key bindings\n\nThe default key bindings can be changed with the `~/.coffeegb.properties` file. The file has following format:\n\n```\nbtn_up=VK_UP\nbtn_down=VK_DOWN\nbtn_left=VK_LEFT\nbtn_right=VK_RIGHT\nbtn_a=VK_Z\nbtn_b=VK_X\nbtn_start=VK_ENTER\nbtn_select=VK_BACK_SPACE\n```\n\nThe key list can be found in the [KeyEvent JavaDoc](https://docs.oracle.com/javase/10/docs/api/java/awt/event/KeyEvent.html#field.summary).\n\n## Resources\n\n* [GameBoy CPU manual](http://marc.rawer.de/Gameboy/Docs/GBCPUman.pdf)\n* [The Ultimate GameBoy talk](https://www.youtube.com/watch?v=HyzD8pNlpwI)\n* [Gameboy opcodes](http://pastraiser.com/cpu/gameboy/gameboy_opcodes.html)\n* [Nitty Gritty Gameboy cycle timing](http://blog.kevtris.org/blogfiles/Nitty%20Gritty%20Gameboy%20VRAM%20Timing.txt)\n* [Video Timing](https://github.com/jdeblese/gbcpu/wiki/Video-Timing)\n* [BGB emulator](http://bgb.bircd.org/) --- good for testing / debugging, works fine with Wine\n* [The Cycle-Accurate Game Boy Docs](https://github.com/AntonioND/giibiiadvance/tree/master/docs)\n* [Test ROMs](http://slack.net/~ant/old/gb-tests/) - included in the [src/test/resources/roms](src/test/resources/roms)\n* [Pandocs](http://bgb.bircd.org/pandocs.htm)\n* [Mooneye GB](https://github.com/Gekkio/mooneye-gb) - an accurate emulator written in Rust, contains great ROM-based acceptance tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrekawek%2Fcoffee-gb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrekawek%2Fcoffee-gb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrekawek%2Fcoffee-gb/lists"}