{"id":18302188,"url":"https://github.com/radioation/atari50controllers","last_synced_at":"2026-06-15T20:31:22.611Z","repository":{"id":63795991,"uuid":"565031324","full_name":"radioation/Atari50Controllers","owner":"radioation","description":"Arduino project to use Atari 8-bit controllers with \"Atari 50: The Anniversary Celebration\"","archived":false,"fork":false,"pushed_at":"2022-11-26T16:47:14.000Z","size":447,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-13T15:22:19.096Z","etag":null,"topics":["arduino","atari8bit"],"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/radioation.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":"2022-11-12T05:40:47.000Z","updated_at":"2022-11-26T02:10:36.000Z","dependencies_parsed_at":"2023-01-22T08:16:07.792Z","dependency_job_id":null,"html_url":"https://github.com/radioation/Atari50Controllers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/radioation/Atari50Controllers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radioation%2FAtari50Controllers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radioation%2FAtari50Controllers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radioation%2FAtari50Controllers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radioation%2FAtari50Controllers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radioation","download_url":"https://codeload.github.com/radioation/Atari50Controllers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radioation%2FAtari50Controllers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34379915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["arduino","atari8bit"],"created_at":"2024-11-05T15:18:29.997Z","updated_at":"2026-06-15T20:31:22.582Z","avatar_url":"https://github.com/radioation.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\nI started working on this after printing out Mike Mika's [Xbox paddle adapter](https://www.thingiverse.com/digitaleclipse/designs)\nfor the \"Atari 50: The Anniversary Celebration\".   I realized I still had some \nold Atari 800 controllers and thought it might be fun to learn\nhow to use an Arduino Leonardo as a Joystick, Keyboard, and Mouse.\n\nWhile working on this, I discovered there are already several other \nprojects and products that adapt Atari 8-bit controllers to PC.  So it's probably \neasier fto just buy an existing adapter, but I do this sort of thing for fun.\nI've been meaning to make custom game controllers for a while now. So this is \na nice, easy learning exercise.\n\nThis project uses an knockff Leonardo and Matthew Heironimus's \n[Arduino Joystick Library](https://github.com/MHeironimus/ArduinoJoystickLibrary/tree/version-2.0)\nand the Arduino [Keyboard and Mouse](https://docs.arduino.cc/built-in-examples/usb/KeyboardAndMouseControl)\nlibraries.   \n\n## CX30 Paddle Controllers\nEach paddle controller has a single fire button and a 1 MΩ potentiometer \nwith just the wiper and one resistive terminal connected.  I originally \nused the voltage divider described\n[here](https://www.circuitbasics.com/arduino-ohm-meter/) to estimate the \nrotation of the paddle knob.   One problem with using the voltage divider\nwas the paddle positions affected each others readings.   To address this,\nI've switched to checking the charging time of an\n[RC circuit](https://www.icode.com/analog-to-digital-conversion-with-rc-circuit-in-microcontroller-projects/).   \nI alternate reading the first and second paddle which seems to eliminate \nthe interference. \n\nI've noticed some problems with this method.  Each paddle has a different \nestimated maximum value.   It doesn't seem to affect gameplay much.\nAnother problem is the paddles don't automatically return to a center position. \nSo the sketch may continously send left or right signals while you're navigating \nyour game menu.   \n\n## CX22  Trackball Controller\nMy sketch is based on the code found [here](https://jeffpiepmeier.blogspot.com/2016/08/vintage-atari-cx22-trak-ball-with-usb.html). \nThe trackball controller should be set to _trackball_ mode but can also \nfunction as a joystick.\n\nWhen in trackball mode, the CX22 figures out both the X and Y direction \nand rotation speed of the trackball for you.  I'm translating the trackball movements into \nmouse movements and using the button as a 'space-bar' press to match\nthe default fire setup in **Atari 50: 5200 _Missile Command_** \n\nIf the trackball is set to `joytsick` mode, the sketch will act like \na joystick instead of a mouse and keyboard.\n\n## CX20  Driving Controller\nThe driving controller is a rotary encoder.  My implementation is based on\n[this](https://howtomechatronics.com/tutorials/arduino/rotary-encoder-works-use-arduino/).\nI added a counter to handle the rotation speed.\n\n## CX40 Joystick\nThe Atari joystick controller is very simple.  It has 4 switches that pull down pins 1-4 of\nthe Atari DE9 port a fire button that pulls down pin 6.  \n\n# The Circuit\nThis circuit can be found\n[here](https://github.com/radioation/Atari50Controllers/blob/master/images/combined.pdf).\nIt can handle all 4 controller types.   The images folder also has simplified circuits that handle the \npaddle, driving, or trackball/joystick controllers individually.   The sketch should work with any\nof them.\n\nTHe circuit lists 5 switches.  SW1, SW2, and SW3 are extra game controller buttons. These were \nadded to support games that use more than one button.  These buttons are optional if you only\nplay games that use one button.  SW4 is a rocker switch.  It's used to center the paddle joystick \noutput.  SW5 is is a reset button and optional.\n\n\nThe sketch can automatically detect the type of controller attached.   I based my detection on Control Freak's\ndescription at [hackaday.io](https://hackaday.io/project/170908-control-freak/log/176711-atariing).    \nIt's not exactly the same.  I don't  have an Atari keypad and they don't mention the trackball controller.  \nMy sketch will first check for a valid paddle value.  If a paddle isn't detected, the sketch checks the \njoystick direction pins to determine what type of controller is attached.   If LEFT and RIGHT pins are detected \nsimultaneously, the controller is a trackball controller.  If UP and DOWN are detected simultaneously, \nit's a driving controller.  If only one direction is detected, it's a joystick.\n\n\n\n# Usage\nPlug your Atari controller into the DE9 port on the Leonardo and connect the Leonardo to your PC's USB port.  \nMove the controller around a bit to let the sketch determine what type of controller is connected.\n\nIf you have a paddle controller or joystick controller, the sketch will act like a USB \nJoystick.   The buttons will be mapped to joystick buttons. The paddle controllers will \nonly affect the X axis of the joystick.  The second paddle controller will be mapped \nto a second USB joystick.  \n\nIf you have a trackball or driving controler, the sketch will act like a Keyboard and \nMouse.  Based on the games I've played in Atari50, I mapped the fire button to \nthe `Spacebar`.  The three other buttons are mapped to the `A`, `B`, and `C` keys.\nYou can either alter the sketch or remap the controls in Atari 50.\n\nIf you want to change the controller, swap it out and press the RESET button on the \nArduino.  This will restart controller detection.\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradioation%2Fatari50controllers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradioation%2Fatari50controllers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradioation%2Fatari50controllers/lists"}