{"id":109,"date":"2011-02-11T20:14:44","date_gmt":"2011-02-12T04:14:44","guid":{"rendered":"http:\/\/robertbyam.com\/ces\/?p=109"},"modified":"2025-03-18T14:26:19","modified_gmt":"2025-03-18T22:26:19","slug":"joywarrior","status":"publish","type":"post","link":"https:\/\/robertbyam.com\/ces\/2011\/02\/11\/joywarrior\/","title":{"rendered":"JoyWarrior"},"content":{"rendered":"<p>I&#8217;ve run into a bit of a dilemma with the gamepads.\u00a0 I want to be able to just automatically configure each emulator for whatever gamepad is plugged in at the time, and also be able to disable emulators if a non-compatible gamepad is plugged in.\u00a0 For example, with the SNES controller, you can play either SNES games or Nintendo games.\u00a0 But you can&#8217;t do it the other way around because the NES controller does not have enough buttons to play SNES games.\u00a0 I&#8217;m planning on building 6 controllers, using 2 more standard out-of-the-box controllers, and then the Wii controllers.\u00a0 I&#8217;ll build 2 NES, 2 SNES, and 2 Genesis controllers.\u00a0 The 2 out-of-the-box controllers will have 2 analog sticks each and be used for the N64 and PS2 emulators, and Wii can be for both the Dolphin emulator and NES.<\/p>\n<p>The automation is necessary for Caleb, or anyone, to be able to use it easily.\u00a0 If I don&#8217;t do this, then before you can play a game, you&#8217;ll have to go into the set up and configure what buttons map to up, down, left right, B, A, etc.\u00a0 This is just too much of a hassle.\u00a0 When its all automated, it will be set up when the emulator launches.\u00a0\u00a0 The correct button on the controller will be already mapped to the correct emulator button, and it will just work.\u00a0 For example, if you launch the NES emulator but have the SNES controller plugged in, it will change the NES emulator settings to use the button in the closest position to the NES controller to be used.<\/p>\n<p>However, in order to be able to do automatic configuration, I need to be able to tell what controller is plugged in, and that&#8217;s where I&#8217;m running into trouble.\u00a0 All of the gamepads and chips I have looked at do not have serial numbers.\u00a0 So if I used one type of store-bought gamepad, or one type of chip, for all 6 I&#8217;m building, there would be no way to tell which one is which when plugged in. <span style=\"color: #ff0000;\">(UPDATE: I have found a better solution to this problem, see &#8220;Case and Controller Solutions&#8221;)<\/span><\/p>\n<p>So, what I&#8217;ll have to do is build each of the 3 different types in 3 different ways.\u00a0 For NES, I&#8217;m going the pure method: real NES controllers converted to USB.\u00a0 For SNES, I&#8217;ll probably get replicas that are already USB with similar authentic feel (but not exact), and for Genesis I can just use a cheap store-bought gamepad and rip out its internals and put them inside the Genesis controller.\u00a0 This way each type will have a different USB Vendor ID and I can tell them apart.<\/p>\n<p>I ordered a joystick chip &#8211; the JoyWarrior &#8211; to try it out in hopes it would have a serial number (other chips from the same company do).\u00a0 It didn&#8217;t, but I still can use it for the NES controllers.\u00a0 I got the chip, and it has a very simple circuit.\u00a0 I dug through my spare electronics parts and found a suitable capacitor and resistor, dug out my breadboard, and put the circuit together.\u00a0 I found an extra USB cord and cut one end off.\u00a0 Then, I plugged it into the computer, and there it was &#8211; a new joystick found.\u00a0 I simply connected a loose wire from the chip&#8217;s pins to ground one at a time to test the buttons.\u00a0 Here is the breadboard all set up:<\/p>\n<p><a href=\"http:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4368.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-106\" title=\"JoyWarrior on breadboard\" src=\"http:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4368-400x266.jpg\" alt=\"JoyWarrior on breadboard\" width=\"400\" height=\"266\" srcset=\"https:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4368-400x266.jpg 400w, https:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4368-1024x682.jpg 1024w, https:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4368.jpg 1280w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>Here&#8217;s a close up of the JoyWarrior chip:<\/p>\n<p><a href=\"http:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4372.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-107\" title=\"JoyWarrior chip\" src=\"http:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4372-400x259.jpg\" alt=\"JoyWarrior chip\" width=\"400\" height=\"259\" srcset=\"https:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4372-400x259.jpg 400w, https:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4372-1024x663.jpg 1024w, https:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4372.jpg 1280w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>I also got the NES controllers in the mail.\u00a0 I found them on ebay for $5 each.\u00a0 These are real, used, original NES controllers.\u00a0 I hooked up the old original Nintendo board again to test the controllers, and they both work great.\u00a0 They&#8217;re a little bit dirty, so I&#8217;ll have to open them up and fully clean them.<\/p>\n<p><a href=\"http:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4375.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-108\" title=\"Original NES Controllers\" src=\"http:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4375-400x316.jpg\" alt=\"Original NES Controllers\" width=\"400\" height=\"316\" srcset=\"https:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4375-400x316.jpg 400w, https:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4375-1024x811.jpg 1024w, https:\/\/robertbyam.com\/ces\/wp-content\/uploads\/2011\/02\/IMG_4375.jpg 1280w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/a><\/p>\n<p>The spare components I had (capacitor and resistors) are much bigger than they need to be, so I&#8217;ll pick up smaller ones at the store and then figure out how I&#8217;m going to build the circuit and stuff it in.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve run into a bit of a dilemma with the gamepads.\u00a0 I want to be able to just automatically configure each emulator for whatever gamepad is plugged in at the time, and also be able to disable emulators if a non-compatible gamepad is plugged in.\u00a0 For example, with the SNES controller, you can play either [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-109","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts\/109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/comments?post=109"}],"version-history":[{"count":10,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts\/109\/revisions"}],"predecessor-version":[{"id":209,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts\/109\/revisions\/209"}],"wp:attachment":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/media?parent=109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/categories?post=109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/tags?post=109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}