{"id":1042,"date":"2011-10-14T22:26:51","date_gmt":"2011-10-14T20:26:51","guid":{"rendered":"http:\/\/www.kameli.net\/marq\/?page_id=1042"},"modified":"2011-10-14T23:56:33","modified_gmt":"2011-10-14T21:56:33","slug":"joyduino","status":"publish","type":"page","link":"http:\/\/www.kameli.net\/marq\/?page_id=1042","title":{"rendered":"Joyduino"},"content":{"rendered":"<p>Use Arduino to emulate an Atari-compatible joystick. Should work on any computer supporting the familiar D9 plug, such as MSX, Commodore 64 or Amiga.<\/p>\n<h2>Building the interface<\/h2>\n<p>You need the following bits and pieces to build the interface:<\/p>\n<ul>\n<li>An <a href=\"http:\/\/www.arduino.cc\/\">Arduino<\/a> board, obviously. I&#8217;ve used an <em>Uno<\/em>, but any recent model should work fine.<\/li>\n<li>Two <a href=\"http:\/\/www.datasheetdir.com\/CD4066B+Analog-Multiplexers-Demultiplexers\">CD4066B<\/a> chips<\/li>\n<li>Female D9 plug<\/li>\n<li>Wires, a breadboard or vero board, soldering iron etc.<\/li>\n<\/ul>\n<p>The schematics look like this:<\/p>\n<p><a href=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2011\/10\/joyduino.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-thumbnail wp-image-1043\" title=\"joyduino\" src=\"http:\/\/www.kameli.net\/marq\/wp-content\/uploads\/2011\/10\/joyduino-150x150.png\" alt=\"\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<p>Nothing complex here, really. Arduino voltages are used to control the four switches of the 4066. Atari joyport pins are active when they&#8217;re grounded. Blue lines, +5V and GND should be connected to the Arduino pins. The design is somewhat easy to implement as a shield, if that&#8217;s what you&#8217;re after.<\/p>\n<h2>Usage<\/h2>\n<p>Next you need to take the following steps:<\/p>\n<ul>\n<li>Upload <em>joyduino.pde<\/em> to the board. After this you don&#8217;t need the Arduino IDE for anything.<\/li>\n<li>If needed, compile the host <em>joyduino<\/em> application for your setup. x86 Linux and Mac OS X binaries can be found in the package. SDL is the only major external dependency.<\/li>\n<li>Start the host. If you don&#8217;t have an <em>Uno<\/em> you&#8217;ll probably need to change the port device name to something else. The port can be given as a command line parameter to the application. On a Mac, give the device name starting with <em>cu<\/em>.<\/li>\n<li>On Linux you need to have permissions to use the serial port. At least on Ubuntu you should be a member of the <em>dialout<\/em> group.<\/li>\n<\/ul>\n<p>At this point you should be able to use the arrow keys and space as an Atari-compatible joystick as long as the window is active. Press esc to quit the host program.<\/p>\n<h2>TODO<\/h2>\n<p>This is still ongoing work, so there&#8217;s a lot that could be improved:<\/p>\n<ul>\n<li>Provide Windows binaries &#8212; reader contributions are welcome!<\/li>\n<li>Support two joysticks. Wouldn&#8217;t need more than a third 4066 plus wires. There is untested support for two controllers already in the software.<\/li>\n<li>Not all joyports are the same. For example many MSX games need two buttons. Spectrum +2 pinout is different. Five lines aren&#8217;t enough to support MSX or Amiga mouse emulation.<\/li>\n<li>Joypad support and configurable keys would be nice (and rather simple to implement).<\/li>\n<\/ul>\n<h2>Files<\/h2>\n<ul>\n<li><a href=\"http:\/\/www.kameli.net\/~marq\/joyduino001.zip\">Joyduino 0.01<\/a>. The initial release.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Use Arduino to emulate an Atari-compatible joystick. Should work on any computer supporting the familiar D9 plug, such as MSX, Commodore 64 or Amiga. Building the interface You need the following bits and pieces to build the interface: An Arduino board, obviously. I&#8217;ve used an Uno, but any recent model should work fine. Two CD4066B [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":974,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1042","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/pages\/1042","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1042"}],"version-history":[{"count":8,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/pages\/1042\/revisions"}],"predecessor-version":[{"id":1051,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/pages\/1042\/revisions\/1051"}],"up":[{"embeddable":true,"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=\/wp\/v2\/pages\/974"}],"wp:attachment":[{"href":"http:\/\/www.kameli.net\/marq\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}