{"id":138,"date":"2012-12-04T00:07:36","date_gmt":"2012-12-04T08:07:36","guid":{"rendered":"http:\/\/robertbyam.com\/ces\/?p=138"},"modified":"2025-03-18T14:26:19","modified_gmt":"2025-03-18T22:26:19","slug":"case-and-controller-solutions","status":"publish","type":"post","link":"https:\/\/robertbyam.com\/ces\/2012\/12\/04\/case-and-controller-solutions\/","title":{"rendered":"Case and Controller Solutions"},"content":{"rendered":"<p>Caleb has started playing <a href=\"http:\/\/en.wikipedia.org\/wiki\/Excitebike\">Excitebike<\/a>!\u00a0 That, and I had a week off from from work so I started working on things again.<\/p>\n<p>First, the case.\u00a0 I had previously thought that the motherboard was not going to fit without removing the RESET button from the front of the NES.\u00a0 I thought it was off by about 1\/8 inch or so, because the top just barely wouldn&#8217;t close, and looking inside I saw the processor fan right up at the top so I figured it wouldn&#8217;t work.\u00a0 While trying to calculate how low I needed to go, I discovered that there is indeed room, and it was actually a piece of the inside of the top that was bumping up against the DVI connector on the back of the motherboard.\u00a0 I removed that piece on the inside, and it just barely closed!\u00a0 So I get to keep the RESET button.\u00a0 Everything now just barely fits.<\/p>\n<p>One thing I had not foreseen that I also just discovered, is I can&#8217;t mount the motherboard where I wanted it at the far side.\u00a0 This is because the mounting standoffs would be going through the existing rubber feet on the bottom of the NES.\u00a0 I&#8217;ll have to move it over a little bit, and that cramps all the room allocated for the fans, power supply, and cords.\u00a0 After a lot of mucking around with this &#8216;puzzle,&#8217; I believe I finally found a way to stuff everything in there and route the cords.<\/p>\n<p>Now about the controllers: previously I thought I would have to use different solutions for every type of controller, as one chip in all controllers meant I wouldn&#8217;t be able to tell them apart.\u00a0 Well, when I was searching for a very simple single USB button to connect the RESET button to, I came across a microprocessor that I think will solve all my troubles: The <a href=\"http:\/\/www.pjrc.com\/store\/teensy.html\">Teensy 2.0<\/a>.\u00a0 At $16, it is only $1 more than I paid for the JoyWarrior (today the JoyWarrior is $4 less).\u00a0 But the JoyWarrior also required a few extra components, and tested my patience soldering everything together in such a small space.<\/p>\n<p>The Teensy is a C programmable microprocessor that comes with libraries and sample code to fully support USB.\u00a0 On top of that, it&#8217;s extremely easy to load firmware on and use. The JoyWarrior required no programming, but fortunately, coding is something I&#8217;m good at.\u00a0 Using their examples, I can easily create my own &#8220;gamepad&#8221; base program.\u00a0 Then, from the base program, I simply have to add whatever buttons I need, and can even add analog sticks, analog triggers, etc.\u00a0 The best part is, I can name how the gamepads show up in Windows, for example, &#8220;CES NES-pad,&#8221; &#8220;CES SNES-pad,&#8221; CES Genesis-pad,&#8221; etc.\u00a0 With names like these, I can pop up a message when an SNES game is started saying to plug the controller in if no compatible controllers are already in.\u00a0 I can also map every button just how I want it. This way there will be no need to re-configure buttons on the NES emulator for an SNES gamepad, because SNES Y and B will be the same Windows buttons as NES B and A, respectively.<\/p>\n<p>The other great thing about Teensy is it requires no other components, and the button inputs can be configured to use pull-up resistors.\u00a0 I had to scratch all the pull-up resistors off from the NES gamepad for use with the JoyWarrior.\u00a0 With the Teensy, all I have to do is connect one wire from power, ground, and each button hole on the NES board to a much easier to solder hole on the Teensy (my biggest headache with the JoyWarrior was trying to solder the wires to its pins).<\/p>\n<p>Another Teensy will also live inside the case and connect to the RESET button.\u00a0 This one I will probably program to show up in Windows as a keyboard, and when the button is pressed it will send something like Ctrl-Alt-Shift-X, which my menu software will use to close the current full-screen emulator and return to the games menu.<\/p>\n<p>My Teensy is on its way in the mail &#8211; I&#8217;m looking forward to playing with it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Caleb has started playing Excitebike!\u00a0 That, and I had a week off from from work so I started working on things again. First, the case.\u00a0 I had previously thought that the motherboard was not going to fit without removing the RESET button from the front of the NES.\u00a0 I thought it was off by about [&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-138","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts\/138","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=138"}],"version-history":[{"count":4,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts\/138\/revisions"}],"predecessor-version":[{"id":142,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/posts\/138\/revisions\/142"}],"wp:attachment":[{"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/media?parent=138"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/categories?post=138"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertbyam.com\/ces\/wp-json\/wp\/v2\/tags?post=138"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}