{"id":17582029,"url":"https://github.com/zalewa/adfotg","last_synced_at":"2025-04-28T16:10:10.141Z","repository":{"id":33781312,"uuid":"157074546","full_name":"Zalewa/adfotg","owner":"Zalewa","description":"ADF On-The-Go","archived":false,"fork":false,"pushed_at":"2024-12-12T18:57:30.000Z","size":1233,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-08T17:52:00.194Z","etag":null,"topics":["adf","amiga","floppy-disks","gotek","raspberry-pi"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Zalewa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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-11-11T11:52:20.000Z","updated_at":"2024-12-12T18:57:34.000Z","dependencies_parsed_at":"2023-11-26T23:22:09.356Z","dependency_job_id":"aa9102ee-f9af-4b7a-9bc0-7d0afa7586f3","html_url":"https://github.com/Zalewa/adfotg","commit_stats":{"total_commits":290,"total_committers":2,"mean_commits":145.0,"dds":0.03103448275862064,"last_synced_commit":"6836ad6515b15889732feb9112def7eb7e3fd5c5"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zalewa%2Fadfotg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zalewa%2Fadfotg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zalewa%2Fadfotg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zalewa%2Fadfotg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zalewa","download_url":"https://codeload.github.com/Zalewa/adfotg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251342724,"owners_count":21574245,"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":["adf","amiga","floppy-disks","gotek","raspberry-pi"],"created_at":"2024-10-22T01:45:18.396Z","updated_at":"2025-04-28T16:10:10.124Z","avatar_url":"https://github.com/Zalewa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg align=\"left\" src=\"/docs/icon.png\"\u003e\n\nADF On-The-Go\n=============\n\n**ADF On-The-Go (adfotg)** converts your **Raspberry Pi Zero** into an\nUSB drive with a web interface. It organises your **ADF** images and\nallows you to bundle one or more of them into **virtual USB drives**.\nYou can swap, download, upload and mount ADFs without ever disconnecting\nthe USB cable from your **Gotek**, all from any modern web browser.\n\n**ADF On-The-Go (adfotg)** is a HTTP service designed for use in a\n**Raspberry Pi Zero**. The RPi must be connected through its USB OTG\nport to a **Gotek** Floppy Drive emulator in an **Amiga** computer.\nADF On-The-Go can prepare ADF images from files, split big files into\nfloppy-sized chunks, or just mount the ADF images directly. It allows to\nstore bundles of ADF files on their own virtual USB drives and swap\nmultiple virtual USB drives freely. All of this is controlled through a\nwebsite interface, by default hosted on a HTTP port **41364**.\n\nThere also is a REST API, if you happen to not like the default UI, but\nits current status is **unstable**.\n\n```\n  ----------- Linux ------------  USB  --------- IDE ---------\n  | ADF OTG |------\u003e| RPi Zero |------\u003e| Gotek |----\u003e| Amiga |\n  -----------       ------------ no+5V ---------     ---------\n```\n\n\n\u003cimg align=\"left\" src=\"/docs/warning.png\"\u003e\n\u003cimg align=\"right\" src=\"/docs/warning.png\"\u003e\n\n!!! HARDWARE DAMAGE RISK !!!\n============================\n\n**CUT OR BLOCK THE +5V LINE IN THE USB CABLE!**\n\nThis line connects the voltage from the Raspberry Pi to Gotek and powers\nup your Gotek and your Amiga. This is **undesirable**. When Amiga PSU is\nOFF, the Amiga will be put in a strange half-state with LEDs lighting up,\nbut the computer remaining off. The RPi will also reboot. When Amiga PSU\nis ON, the +5V USB line will prevent the Amiga's Power LED from dimming\nwhen Amiga reboots.\n\n**FOR SAFETY MEASURES, CUT OR BLOCK THE +5V LINE!**\n\n\n\u003cimg align=\"right\" width=400 src=\"/docs/mainpage.jpg\"\u003e\n\nSecurity\n========\n\n**This is important!**\n**There's no network security provided by the app itself!**\n\nIt doesn't even put a basic HTTP authentication in place. When you host it\non your device, keep it in a private network without remote access.\n\nThis software requires **'root' privileges** to perform certain\noperations. While the application will run as a normal user, it will abuse\n`sudo` to obtain root privileges when needed. Ensure your RPi user can `sudo`\nwithout password prompt.\n\n\nRequirements\n============\n\nAdfotg supports Raspberry Pi OS 12 (bookworm) since version 0.4.0.\n\nSoftware:\n\n* Raspberry Pi OS 12 (bookworm) or newer\n* Python 3, pipx\n* mtools\n\nHardware:\n\n* Raspberry Pi Zero\n* Gotek\n* An Amiga\n\nOS:\n\n* `sudo` privileges will be required\n\n\nPreparing your Raspberry Pi\n===========================\n\n**This is mandatory.**\n\nWe need to make sure we are using the dwc2 USB driver,\nand that `dwc2` and `g_mass_storage` modules are enabled.\n\nIf you have a fresh Raspberry Pi OS, it's enough to do:\n\n```\n  echo dtoverlay=dwc2 | sudo tee -a /boot/config.txt\n  echo dwc2 | sudo tee -a /etc/modules\n  echo g_mass_storage | sudo tee -a /etc/modules`\n```\n\nThen reboot your RPi.\n\nThe above is based on https://gist.github.com/gbaman/50b6cca61dd1c3f88f41\n\nIn case of trouble with connecting to Gotek, you may try to\ndiagnose the USB problems by connecting the RPi to an USB socket\nin a PC. When an USB drive image is mounted, the PC should see\nthe RPi as an USB drive.\n\n\nInstall\n=======\n\nThis program is designed to be run on a **Raspberry Pi Zero** with the\n*Raspberry Pi OS*. Installing the release package on anything else is not\nrecommended, although will succeed and should be harmless (no warranty).\n\nOn your Raspberry Pi:\n\n```\n  sudo apt update \u0026\u0026 sudo apt install mtools pipx\n  sudo PIPX_HOME=/opt/adfotg PIPX_BIN_DIR=/usr/local/bin pipx install adfotg\n```\n\nThe first time installation may be lengthy (it's only a **Zero**, after all).\n\n\nIntegrating with Raspberry Pi OS\n--------------------------------\n\nAfter `pipx install adfotg` is done, run:\n\n```\n  sudo adfotg --install\n```\n\nThis will:\n\n1. Add 'adfotg' system user to Raspberry Pi OS and allow this user a\n   password-less sudo privilege.\n2. Create adfotg's default config file in `/etc/adfotg.conf`.\n3. Create adfotg's base directory at `/var/lib/adfotg`.\n4. Add `adfotg.service` to systemd; adfotg will start with the system.\n\n\nUpdate\n------\n\nMake sure you do this logged in as the same OS user that you\nused during the installation.\n\n```\n  sudo PIPX_HOME=/opt/adfotg PIPX_BIN_DIR=/usr/local/bin pipx upgrade adfotg\n```\n\nAdfotg needs to be restarted now. If you integrated it with your\n*Raspberry Pi OS* (see the section below), then it's sufficient to\ndo this:\n\n```\n  sudo systemctl restart adfotg\n```\n\n\nUninstall\n=========\n\nAdfotg needs to be uninstalled manually and this is even more involved\nthan installing. Depending on how far you've went with installation and\nwhat you wish to keep, you may be skipping some steps.\n\n* First of all, stop the service:\n\n```\n  sudo systemctl stop adfotg\n```\n\n* If you wish to uninstall, and then install adfotg again, do:\n\n```\n  sudo PIPX_HOME=/opt/adfotg PIPX_BIN_DIR=/usr/local/bin pipx uninstall adfotg\n```\n\nThis will keep the internal Python setup, your config and your ADF/USB library.\nThen proceed as if installing for the first time.\n\n* To remove the internal Python setup, do:\n\n```\n  sudo rm -rf /opt/adfotg\n```\n\n* To uninstall from systemd and to remove the adfotg OS user:\n\n```\n  sudo rm /usr/local/lib/systemd/system/adfotg.service\n  sudo systemctl daemon-reload\n  sudo deluser adfotg\n```\n\n* To remove the config:\n\n```\n  sudo rm /etc/adfotg.conf\n```\n\n* To remove your ADF and USB images library:\n\n```\n  sudo rm -rf /var/lib/adfotg\n```\n\n\nDevelopment\n===========\n\nPlease see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n\nTroubleshooting\n===============\n\n**Problem:** Gotek perpetually displays `---` when connected to RPi,\neven though it works with my usual USB drive.\n\n**Solution:** `---` indicates that you have Cortex firmware installed on\nyour Gotek. See if you have `SELECTOR.ADF` on your USB drive. If yes,\nthis ADF must also be placed on every mount image you create in adfotg.\n\n\n**Problem:** I upgraded to a new version, but there are oddities\nhappening or I don't see any changes.\n\n**Solution:** There may be two reasons for this. Your browser might've\ncached the old version of the site or the adfotg service wasn't\nrestarted. See the \"Update\" section in README to learn how to restart\nthe service and clear your browser cache.\n\n\n**Problem:** This software ceases to work after the system upgrade.\n\n**Solution:** Sorry, both Raspberry Pi OS and the Python rules for\nsoftware distribution and installation tend to change. Reinstalling\nadfotg from scratch may help. Other than that, contact me for more\nhelp.\n\n\nBackground\n==========\n\n[Gotek](http://www.gotek.in/) is a hardware floppy-drive replacement for\nlegacy machines. Instead of using failure-prone floppy disks, it allows\nto use a USB flash drive with floppy-disk images. Multiple images can\nbe stored on a single flash drive and Gotek allows by default to choose\nbetween them through buttons located on the case. While Gotek is an\nexcellent device that eradicates the inconvenience of floppy disks,\nit not only doesn't solve the inconvenience of disk swapping but makes\nit worse by replacing labeled floppy-disks with incomprehensible\nordinal numbers (from 0 to 999).\n\n\n[Raspberry Pi Zero](https://www.raspberrypi.org/) is a cheap mini-computer\nthat can run Linux. It has two major features that are in use in this project:\n\n* WiFi\n* USB On-The-Go\n\nWhile WiFi (or any Ethernet connection) is used here as the access layer\nto the ADF On-The-Go software, USB On-The-Go is the real enabler. While\nit has many applications, we are only interested in one. It allows to\nmake the RPi appear to be an USB flash drive - a flash drive which\ncontents we can fully control and change on-the-fly using Linux command\nline tools and which we can program to serve the content we want.\n\nGuide for setting up OTG mode on Raspberry Pi can be found here:\nhttps://gist.github.com/gbaman/50b6cca61dd1c3f88f41\n\n\n[amitools](https://github.com/cnvogelg/amitools/) contains xdftool,\nwith which adfotg is capable of manipulating ADF image files to\nsome extent. Adfotg doesn't depend on amitools, but incorporates\na subset of its source code and installs `adfotg-xdftool` as a separate\ntool.\n\n\nREST API\n========\n\nREST API documentation is currently a Work-In-Progress.\nadfotg is capable of providing the documentation for itself\nin a plain-text format through the `/help` endpoint.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalewa%2Fadfotg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzalewa%2Fadfotg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzalewa%2Fadfotg/lists"}