{"id":202,"date":"2012-08-16T02:14:13","date_gmt":"2012-08-16T07:14:13","guid":{"rendered":"http:\/\/slackworld.org\/blog\/?p=202"},"modified":"2013-03-12T22:44:18","modified_gmt":"2013-03-13T03:44:18","slug":"usbasp-nes-hackaday-mashup","status":"publish","type":"post","link":"http:\/\/slackworld.org\/blog\/archives\/202","title":{"rendered":"USBasp + NES = Hackaday mashup"},"content":{"rendered":"<h2>Inspiration<\/h2>\n<p>I have been playing around with Betemcu, a version of the <a href=\"http:\/\/www.fischl.de\/usbasp\/\" target=\"_blank\">USBasp<\/a> AVR programmer, for a while. \u00a0I originally read about\u00a0<a href=\"http:\/\/jethomson.wordpress.com\/2011\/08\/18\/project-ouroboros-reflashing-a-betemcu-usbasp-programmer\/\" target=\"_blank\">Project Ouroboros<\/a> from the following <a href=\"http:\/\/hackaday.com\/\">Hackaday<\/a> post:<\/p>\n<p><a href=\"http:\/\/hackaday.com\/2011\/08\/26\/dev-board-from-an-avr-programmer\/\" target=\"_blank\">Dev board from an AVR programmer<!--more--><\/a><\/p>\n<p><a href=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-betemcu.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-209\" title=\"had-usbnes-betemcu\" alt=\"\" src=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-betemcu-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-betemcu-300x225.jpg 300w, http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-betemcu-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>So after a software upgrade it ends up as an Atmega8 dev board wired up perfectly for use with <a href=\"http:\/\/www.obdev.at\/products\/vusb\/index.html\" target=\"_blank\">V-USB<\/a>,\u00a0a software USB stack for AVR MCUs. \u00a0I have been having fun using this as a low cost ($&lt;10 delivered)\u00a0dev board and I have some of my own project planned for the future.\u00a0A few weeks ago I came across this Hackaday post:<\/p>\n<p><a href=\"http:\/\/hackaday.com\/2012\/07\/19\/usb-dongle-for-unmodified-nes-controllers\/\" target=\"_blank\">USB dongle for unmodified NES controllers<\/a><\/p>\n<p>Which is a USB dongle for an NES controller using V-USB.<\/p>\n<p>V-USB Hardware + V-USB Software =<\/p>\n<h2>Mashup<\/h2>\n<p>The light bulb came on, and when I got home I whipped up the following.<\/p>\n<p><a href=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-208\" title=\"had-usbnes\" alt=\"\" src=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-300x225.jpg 300w, http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>I already had the Betemcu USBasp, the NES controller and the controller jack from an NES autopsy. I little modification to the code and I had a working NES controller on my PC. \u00a0I love it when a plan comes together.<\/p>\n<h2>Pinout<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-207\" title=\"had-usbnes-wires\" alt=\"\" src=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-wires-300x225.jpg\" width=\"300\" height=\"225\" srcset=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-wires-300x225.jpg 300w, http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-wires-1024x768.jpg 1024w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>I chose pins that were available on the ISP connector of the Betemcu USBasp and mapped them to the NES controller.<\/p>\n<p><a href=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-pinout.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-211\" title=\"had-usbnes-pinout\" alt=\"\" src=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-pinout-300x265.jpg\" width=\"300\" height=\"265\" srcset=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-pinout-300x265.jpg 300w, http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/had-usbnes-pinout.jpg 561w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h2>Code<\/h2>\n<p>The code for the USB &#8211; NES adapter was intended for an ATtiny45 so minor code changes were made to match the pinout, some code for the fuses was commented out and the make file was updated for the Atmega8. \u00a0I believe I also needed to delete &#8220;usbdrvasm.o&#8221; file.\u00a0For specifics changes compare the code below to the <a href=\"http:\/\/www.bidouille.org\/elec\/usbnesadapter#2\" target=\"_blank\">original<\/a>.<\/p>\n<p><a href=\"http:\/\/slackworld.org\/blog\/wp-content\/uploads\/2012\/08\/USB-NES-Betemcu-USBASP.zip\">USB NES Betemcu-USBASP.zip<\/a><\/p>\n<p><span style=\"color: #555555; font-size: 20px; font-weight: bold; line-height: 26px;\">More Info<\/span><\/p>\n<p>See the <a title=\"Project Ten Pin\" href=\"http:\/\/slackworld.org\/blog\/project-ten-pin\">Project Ten Pin<\/a> for more information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Inspiration I have been playing around with Betemcu, a version of the USBasp AVR programmer, for a while. \u00a0I originally read about\u00a0Project Ouroboros from the following Hackaday post: Dev board from an AVR programmer<\/p>\n","protected":false},"author":1,"featured_media":210,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[37,33,36,35,31],"class_list":["post-202","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics","tag-10pin","tag-avr","tag-hackaday","tag-nes","tag-usbasp"],"_links":{"self":[{"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/posts\/202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/comments?post=202"}],"version-history":[{"count":12,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/posts\/202\/revisions"}],"predecessor-version":[{"id":284,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/posts\/202\/revisions\/284"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/media\/210"}],"wp:attachment":[{"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/media?parent=202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/categories?post=202"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/slackworld.org\/blog\/wp-json\/wp\/v2\/tags?post=202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}