{"id":17721503,"url":"https://github.com/HerrZatacke/wifi-gbp-emulator","last_synced_at":"2025-03-14T05:31:41.606Z","repository":{"id":52583281,"uuid":"262579431","full_name":"HerrZatacke/wifi-gbp-emulator","owner":"HerrZatacke","description":"A GameBoy printer emulator which provides the received data over a wifi-connection.","archived":false,"fork":false,"pushed_at":"2022-02-25T00:22:02.000Z","size":242,"stargazers_count":56,"open_issues_count":5,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-13T12:47:25.011Z","etag":null,"topics":["gameboy-camera","gameboy-printer","gameboy-printer-emulator"],"latest_commit_sha":null,"homepage":"","language":"C++","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/HerrZatacke.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}},"created_at":"2020-05-09T13:41:18.000Z","updated_at":"2024-03-07T15:12:48.000Z","dependencies_parsed_at":"2022-09-23T18:51:27.331Z","dependency_job_id":null,"html_url":"https://github.com/HerrZatacke/wifi-gbp-emulator","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/HerrZatacke%2Fwifi-gbp-emulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HerrZatacke%2Fwifi-gbp-emulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HerrZatacke%2Fwifi-gbp-emulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HerrZatacke%2Fwifi-gbp-emulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HerrZatacke","download_url":"https://codeload.github.com/HerrZatacke/wifi-gbp-emulator/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":["gameboy-camera","gameboy-printer","gameboy-printer-emulator"],"created_at":"2024-10-25T15:34:54.866Z","updated_at":"2025-03-14T05:31:41.283Z","avatar_url":"https://github.com/HerrZatacke.png","language":"C++","funding_links":[],"categories":["Game Boy Camera","Printer emulators","游戏机相机","🔧 Middleware \u0026 SDKs"],"sub_categories":["Retrieving images","检索图像","Nintendo SDKs \u0026 Hardware"],"readme":"# WiFi GBP Emulator\nA GameBoy printer emulator which provides the received data over a WiFi connection  \nThis code has been created for a \"LOLIN(WEMOS) D1 R2 \u0026 mini\" [ESP8266 based board](https://github.com/esp8266/arduino)  \n\nIf you are proficient in soldering, there is now a [PCB/Shield to hold the ESP and the optional display](https://github.com/cristofercruz/gbp-esp-shield-pcb)  \nThe required (recommended) [gameboy printer web interface can be found on github as well](https://github.com/HerrZatacke/gb-printer-web/)  \n\n## Setup\nIt's a good idea to follow the [detailed beginners guide](beginner_setup_guide.md)  \nFor uploading the Filesystem to the ESP you require the [SPIFFS Arduino IDE Plugin](https://github.com/esp8266/arduino-esp8266fs-plugin/releases). Follow the installation instructions [here](https://github.com/earlephilhower/arduino-esp8266fs-plugin/)  \nBefore compiling the project you need to create a `config.h` inside the project folder  \n([`config.h.sample.txt`](/wifi-gbp-emulator/config.h.sample.txt) should be used as a reference)  \nIf you run the default setup (similar to the WiFi-Printer) that file can be left empty  \nIf your (hardware-)setup is different you can adjust the parameters there  \n\n## Bootmode\nThe code is designed to check pin `D0` for high to boot in printer mode  \nThrough this it is possible to use the +5v provided by the GameBoy to switch the mode  \nThe default will alternate the bootmode automatically between printer and server on each boot, so you can use the reset-button to switch modes  \nIf you have the possibility to sense the 5V signal, from the GameBoy, you can uncomment `#define SENSE_BOOT_MODE` in your `config.h`  \n\n## Configuration\nIf the device is not configured the default settings (AP only) will be used\n\n### Default config\nIf not present the ESP will set up an accesspoint with ssid/password `gameboyprinter`  \nIt will output it's IP adress over the serial monitor and on an optionally connected display  \n(usually the device should be accessible via `http://192.168.4.1`)  \nIt will also be discoverable via Bonjour/mDNS via `http://gameboyprinter.local`  \n\n### Manual Setup via `conf.json`\nWifi setup can be done via a file `conf.json` in the `/data/` folder  \nThe basic format are as follows:\n```` json\n{\n  \"mdns\": \"gameboyprinter\",\n  \"ap\": {\n    \"ssid\":\"gameboyprinter\",\n    \"psk\":\"gameboyprinter\"\n  },\n  \"networks\": [\n    {\n      \"ssid\":\"Your SSID\",\n      \"psk\":\"Your wifi password\"\n    }\n  ]\n}\n````\n\nAll config options are optional\n\n#### `\"mdns\"`\nChange the name by which the printer will be accessible via Bonjour/mDNS\n\n#### `\"ap\"`\nAccessPoint config  \nEnter ssid/psk to open an accesspoint different to the default one.\n\n#### `\"networks\"`\nArray of objects with keys ssid/psk  \nThe first reachable network in that list will be used to conect to  \n⚠ Do not use more than 10 elements. Otherwise you might see an \"Out of Memory\" error in the serial monitor  \n\n### Manual Setup via web interface\nThe following will describe the \"raw\" interface for updating ther configuration. You will only need this if you decide not to use the existing web-interface\n\n#### Reading\ncalls to `/wificonfig/get` delivers the actual config (passwords are omitted)\n\n#### Writing\ncalls to `/wificonfig/set` will update the sent properties  \nmake sure to send the data as a JSON string in the POST-Body\n\n##### Updating existing networks\n* Networks are based on the `ssid`-property\n* Existing networks do not have to be sent if they should remain unchanged.\n* If the update for a network contains `\"delete\": true`, the networek will be deleted\n* If the update for a network contains a `psk` it will be updated otherwise left untouched\n\n## Automatic update of the webserver content\n* You can run [`update_w.ps1`](./update_w.ps1) (windows-powershell) or [`update_w.sh`](./update_w.sh) (bash) to download the latest release of the [gb-printer-web](https://github.com/HerrZatacke/gb-printer-web/releases/) and automatically unzip it to the correct folder  \n* After doing so upload the content of that folder to the ESP via the [arduino-esp8266fs-plugin](https://github.com/esp8266/arduino-esp8266fs-plugin/releases/) in the Arduino IDE.\n\n## Hardware Setup\nGameboy Original/Color Link Cable Pinout\n```\n __________\n|  6  4  2 |\n \\_5__3__1_/ (at cable)\n\n| Link Cable | ESP8266 |\n|------------|---------|\n| Pin 1      | D8      |\n| Pin 2      | D7      |\n| Pin 3      | D6      |\n| Pin 5      | D5      |\n| Pin 6      | G       |\n\n```\n\nAdditionally an [OLED Display](https://github.com/HerrZatacke/wifi-gbp-emulator/#oled-display) can be added via D1 -\u003e Display SCL / D2 -\u003e Display SDA \n\n## ToDos\nEnhance performance while saving (maybe by constantly writing all data to a single file instead of buffering and flushing it) \n\n## Links / Research\n* Best \"all in one\" pcb for this project is [cristofercruz's gbp-esp-shield-pcb](https://github.com/cristofercruz/gbp-esp-shield-pcb)\n* Original GPB-Emulator by [mofosyne: Arduino Gameboy Printer Emulator](https://github.com/mofosyne/arduino-gameboy-printer-emulator)  \n* Tutorial on how to work with an ESP8266 by [ttapa: ESP8266 Beginner's Guide](https://tttapa.github.io/ESP8266/Chap01%20-%20ESP8266.html)  \n* Potentially faster library for data transfer [applefreak/esp8266-gameboy-printer](https://github.com/applefreak/esp8266-gameboy-printer)\n* ESP8266 D1 Mini [Pinout](https://escapequotes.net/esp8266-wemos-d1-mini-pins-and-diagram/)\n* SPIFFS/LittleFS [Filesystem Docs](https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html)\n* [Link cable breakout board](https://github.com/Palmr/gb-link-cable)\n* [Lots of helpful GameBoy and GameBoy Camera resources](https://github.com/gbdev/awesome-gbdev)\n\n## OLED Display\nYou can add a [tiny oled display like this](https://www.amazon.de/gp/product/B07BDFXFRK) or [(probably) this](https://de.aliexpress.com/item/32672229793.html)   \nTo use it, you need to uncomment `#define USE_OLED` and the following lines   \nThe display will show the current wifi-config while in server mode, as well as the number of printed images  when in printer mode  \n**Please note the image count in printer mode only regularly updates while idle, and not while printing a batch of images**\n\n## Demo Video\n~~An earlier version of this code did stream the received image-data to a browser via websockets. This is shown in [this older video](https://www.youtube.com/watch?v=HHPHkeio85U).~~    \n### ⚠ Take care ⚠\nYou should not power the ESP from the GameBoy, as this might damage the GameBoy itself. What you see in the video was meant as a proof of concept which is basically not implemented anymore  \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHerrZatacke%2Fwifi-gbp-emulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHerrZatacke%2Fwifi-gbp-emulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHerrZatacke%2Fwifi-gbp-emulator/lists"}