{"id":17721511,"url":"https://github.com/tidklaas/esp32-gameboy-printer","last_synced_at":"2025-03-14T05:31:41.927Z","repository":{"id":98207376,"uuid":"145447795","full_name":"tidklaas/esp32-gameboy-printer","owner":"tidklaas","description":"Emulate a Game Boy Printer with an ESP32","archived":false,"fork":false,"pushed_at":"2018-09-03T18:26:47.000Z","size":108,"stargazers_count":62,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-07-30T18:38:31.475Z","etag":null,"topics":["esp-idf","esp32","gameboy"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tidklaas.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":"2018-08-20T17:11:17.000Z","updated_at":"2024-06-29T09:05:16.000Z","dependencies_parsed_at":"2023-05-18T15:18:16.512Z","dependency_job_id":null,"html_url":"https://github.com/tidklaas/esp32-gameboy-printer","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/tidklaas%2Fesp32-gameboy-printer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidklaas%2Fesp32-gameboy-printer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidklaas%2Fesp32-gameboy-printer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tidklaas%2Fesp32-gameboy-printer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tidklaas","download_url":"https://codeload.github.com/tidklaas/esp32-gameboy-printer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532517,"owners_count":20306151,"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":["esp-idf","esp32","gameboy"],"created_at":"2024-10-25T15:34:55.050Z","updated_at":"2025-03-14T05:31:41.919Z","avatar_url":"https://github.com/tidklaas.png","language":"C","funding_links":[],"categories":["Printer emulators"],"sub_categories":[],"readme":"# ESP32 Game Boy Printer\n\nThis project lets you rescue all those precious childhood pictures you snapped\nwith the Game Boy Camera. Simply use an [ESP32][1] module, a level shifter and\n~~a WiFi enabled device with a web browser~~ your smartphone to save those\nsnaps before the camera's on-board battery fails.  \nAlternatively, you could go and do some 2-bit street photography and earn some\nserious Hipster Cred[tm] on Instagram.\n\n1. Install and set up the [Espressif IoT Development Framework][2].\n2. Study the [documentation][3]!\n3. Clone this project and initialise it by calling\n   ``submodule update --init --recursive``.\n4. Run ``make defconfig``.\n5. Run ``make erase_flash``.\n6. Run ``make flash monitor``.\n7. If you run into problems during steps 4 - 6, refer to step 2.\n8. Connect the Game Boy to the ESP __using a 3.3V \u003c-\u003e 5V logic level shifter.__\n9. Print away.\n10. Connect your phone to the WiFi network GB-Printer.\n11. Point your web browser to ``http://192.168.4.1``.\n12. Revel in the 160x144x4 retro glory.\n13. ???\n14. Profit!\n\n\n## How to Connect\nConsult the [Game Boy Link pin-out](http://www.hardwarebook.info/Game_Boy_Link)\nand connect SO to GPIO 13, SI to GPIO 4 and SC to GPIO 14. If you are not using\nbi-directional level shifters, make sure that for SO and SC the signal\ndirection is from the Game Boy (GB) to the ESP and for SI it is from ESP to\nthe GB. You will also have to connect GND on both ends and both VDDs to the\nrespective reference voltage inputs.  \n*N.B.* Do not try to power the ESP from the Game Boy. Most ESP32 modules out\nthere use inefficient linear regulators and can pull more than 500mA of\ncurrent.\n\n\n## Usage\nOnce the ESP has received a complete image from the GB, it will encode it as a\nPNG and store it in flash. Stored images can be viewed at and downloaded from\nthe HTTP server at address 192.168.4.1. Images are named ``imgxxxxx.png`` where\n``xxxxx`` is a sequence number counting up from 0. New images are stored using\nthe first free number found, starting at the last index used.\n\nOn the web page there are two links above the displayed images.\n``Delete all pictures`` will remove all stored images without resetting the\nsequence counter. So, if you hit this link after printing images 0 to 22, the\nnext image printed will still be saved as ``img00023.png``. This should help\npreventing accidentally overwriting older images when downloading newer ones.\n\n``Reset sequence numbering`` resets the sequence counter to 0, so new images are\nagain saved at the lowest index available. So, for example, let us say you printed\nimages 0 to 22, then hit ``Delete all pictures``. Now you continue printing images\nfrom 23 to 41. If you hit ``Reset sequence numbering``, the next image will be\nsaved as ``img00000.png``. If you keep printing, image numbers will go up until\nthey reach 22. Since number 23 to 41 are already taken, the next image will have\nnumber 42.\n\n## Limitations and Quirks\nThe code has only been tested against the Game Boy Pocket with the Camera  module\nand might not work with other versions of the Game Boy or different game modules.\nThe compressed image transfer format is not supported at all. Without a way of\ntesting there was no point in implementing it.\n\nSince the whole protocol is bit-banged, it is susceptible to delays caused by other\nhigher priority tasks running on the ESP. This means mostly the WiFi task, so avoid\nconnecting devices or accessing the web server while printing to the ESP.\n\nError detection has been designed to err on the side of caution, so the ESP might\nsignal a transfer error to the GB, even though the image has been transferred and\nsaved correctly. This was deemed preferable to silently losing data.\n\nDue to the way filesystem access and caching directives are handled in\n[libesphttpd][4], browsers might cache images that have been deleted and re-written\nwith different data. Do not be surprised to see unexpected images after deleting\nall images and resetting the image sequence numbering. Clearing the browser cache\nshould fix this problem.\n\n## Security Considerations\nThere is no security, only Zuul. Well, not even Zuul. Everything is accessible on an\nopen WiFi network and HTTP server. Do not use this to pull your d*ck pics from your\nGame Boy Camera.\n\n## Acknowledgments\n* This Project was originally based on applefreak's [esp8266-gameboy-printer][5],\n  but the only part that survived was the ``style.css``, so thanks for that.\n* PNG encoding is done using Lode Vandevenne's [LodePNG][6].\n* Web server functionality is provided by Chris Morgan's [ESP32 fork][4] of\n  Jeroen Domburg's libesphttpd.\n\n[1]: https://espressif.com/en/products/hardware/esp32/overview\n[2]: https://github.com/espressif/esp-idf\n[3]: https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html\n[4]: https://github.com/chmorgan/libesphttpd\n[5]: https://github.com/applefreak/esp8266-gameboy-printer\n[6]: https://lodev.org/lodepng\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidklaas%2Fesp32-gameboy-printer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftidklaas%2Fesp32-gameboy-printer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftidklaas%2Fesp32-gameboy-printer/lists"}