Step 5: References

Andrew Brown's project to create a gamecube to N64 adapter with the Arduino was invaluable while coding for this project: http://www.cs.duke.edu/~brownan/n642gc.html

Helpful schematics can be found here: http://www.raphnet.net/electronique/gc_n64_usb/index_en.php

Information on the N64 controllers proprietary protocol can be found here: http://www.mixdown.ca/n64dev/
Great post!<br> <br> With the new version of Arduion-1.0 i did have to include the &quot;import&quot; stuff &amp; as well take care of RXTX-2.2pre1 / RXTX-2.2pre2 (<em>see below</em>)<br> <br> <br> <strong>Minor Issue:</strong><br> Has anyone made a patch yet for the controller's sensitivity? With a lot of games this is a HUGE problem.<br> <br> Overall, great job throwing together the documentation<br> <br> <br> <strong>Fix the RXTX errors:</strong><br> <a href="http://rxtx.qbang.org/wiki/index.php/Download" rel="nofollow">http://rxtx.qbang.org/wiki/index.php/Download</a>
Hey xenoic, which version do I need to download? And do I need the source or binary?
Currently they are only offering &quot;RxTx-2.2 pre2&quot;. So this should help you out. <br><br>just pull back the latest RxTx 2.2 preview version &amp; you should be good<br>
<p>I know this is an old project, but it is still awesome. Tried it out with processing 2.2.1 which seems to work fine. Just include the import already listed in the description and this <b>import java.awt.event.KeyEvent; --- So total additional import is </b></p><p>import java.awt.Robot;</p><p>import java.awt.AWTException;</p><p>import java.awt.event.InputEvent;</p><p>import java.awt.event.KeyEvent; </p>
<p>Thank you for this instructable, I'm finally able to play again majora's mask as it should! (after some adjustment now that it is version 3 of processing :) )</p>
<p>hello, and Great instructable! very easy to follow. however, i have one question. i get an error that says</p><p>Error, disabling serialEvent() for COM3</p><p>null</p><p>any help? it is greatly appreciated, and keep up the good work!</p>
<p>I also have this problem :/</p>
<p>Hi, I'm trying to get this to run on Ubuntu 14.04.<br><br>I seem to only be able to get processing 3 to run natively and I'm running processing 1.5.1 out of WINE. <br><br>When I try to run the processing code I get this error message and I have no idea how to make heads or tails of it, any help with getting this up and running would be really appreciated! I mean to link it up to pure data and play some music with my controller! (also just Jet Force Gemini)</p>
<p>woops, forgot to include the error message- here's some info</p><p>Error inside Serial.&lt;init&gt;0</p><p>(with the line N64 Connection = new Serial(this, portName, 115200) highlighted)<br><br>the whole error message is much longer and I'll type it up soon- can't seem to copy paste...</p>
<p>i suppose I'll type the whole thing up if you let me know if you can help.<br><br>The first line is:</p><p>gnu.io.PortInUseException; Unkonwn Application</p>
<p>I have actually built on of the v-usb based adapters from raphnet.net I part of the way though porting his implementation into something more arduino friendly. I saw this link and spent a little time today to see how well it works. The code isn't very pretty but it does work. I modified it to read 2 n64 controllers at the same time and created a HID usb descriptor for v-usb for it to show up as 2 gamepads. No host software needed. Just a note, 2 of your links from above are dead.<br><br>Hopefully I can find the time to spin off a continuing instructable that shows how much more power you can get out of this set up.<br><br>Thanks for sharing</p>
<p>Has anyone got this to work with a RetroPie? http://blog.petrockblock.com/retropie/</p>
Im trying to use custom pads that send keypresses like the makey makey to control it.<br>how do i do it plz help been stuck on this for weeks
Having inserted the three import lines, I'm having an issue running the the two Processing files, both coming up with this issue: <br>&quot;Cannot find anything named &quot;KeyEvent.VK_UP&quot; <br>on this line: <br>&quot;VKey.keyPress(KeyEvent.VK_UP);// DUp&quot; <br>Any ideas?
<p>You need to add this&quot;<b>import </b><b>java</b>.awt.event.KeyEvent;&quot;</p>
I've been trying to get Controller Pak support working, but it seems the timing of the sending/polling isn't accurate enough as getting the controller status and button state works fine (verified this by logging the data) but the mempak refuses to work. I don't know assembly so I can't convert the entire code to it, does anyone have any suggestions for optimizing my code and making timing more accurate? <br> <br>Arduino code can be found here: https://dl.dropboxusercontent.com/u/8225581/N64_Arduino.rar <br>Project64 plugin source: https://dl.dropboxusercontent.com/u/8225581/ArduiN64.rar
<p>Hey I recently got ahold of your code (I don't know if you're even still on that project, its been about 10 months.) What COM port is your program searching for? Because My UNO is on COM3 and it says Failed to open com port</p>
<p>Just saw your reply, in that code it uses COM4 but you can change it in Controller.cpp near the top at #define comPort. I never added a config window to allow changing the COM port since having it hardcoded worked fine for my own personal use and I was more interested in getting controller paks working. Still not sure why the Memory Pak doesn't work, it seems to transfer data fine but struggles with the 32-byte data packets and the data gets corrupted. Might be a timing issue. It's a pity since the only adapter that works with paks to my knowledge is the Adaptoid and those are not easy to get anymore. Would be nice to have full pak support, add USB HID and maybe do a production run of some boards if people are interested.</p>
<p>Great instructable! In well under an hour I now have my old n64 controller hooked up to my pc all with stuff I had lying around :). </p><p>Also for those using the latest processing 2.2.1 make sure to look at @BrookBigford's comment for the additional import line that is needed.</p>
<p>Solution :</p><p>cannot find anything named &quot;KeyEvent.VK_UP&quot;</p><p>I just downloaded processing 2.2.1 and received this error trying to run the N64_Controller_mouse.pde file. I fixed it by including this line to the list of files to import.</p><p>import java.awt.event.KeyEvent; //&lt;----SOLUTION</p>
I don't know if this instructable is still alive, but in the Processing window, it says that it &quot;cannot find anything named &quot;KeyEvent.VK_UP&quot;. &quot; I feel like I'm so close to being able to play!
I think that over time the processing people have changed the way KeyEvents work, but I remember someone commenting with the changes that needed to be made to the code...<br><br>If that doesn't work, you could try and find the old version of processing that I used to write this tutorial. I think it was 1.0
Have you had any luck in finding 1.0, or have you found a way to allow it to work on 1.5.1? - Thanks
I think I found the old version of processing for anyone interested. <br>https://code.google.com/p/processing/downloads/detail?name=processing-1.0.9.zip&amp;can=4&amp;q=
Quick addon, I managed to get this working flawlessly with Zelda with the link I posted for Processing 1.0.9.Work the sake of being a clean project, I soldered on some jumper wires that came with my arduino, onto the wires for the controller. Now I can very easily add/remove the controller when I am not using it. Thanks for the GREAT instructable.
Anyone have any luck either getting this to work with Processing 1.5.1 or newer or find a place to download 1.0/1.1?
Having some problems getting the Processing application to work. I've tried Version 2.0b6 and version 1.2.1 becasue I can find ! and i keep geting the following error about disabling serialEvent. Doesn't have anything about a RXTX missmatch Stable Library ========================================= Native lib Version = RXTX-2.1-7 Java lib Version = RXTX-2.1-7 error, disabling serialEvent() for //./COM2 java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at processing.serial.Serial.serialEvent(Unknown Source) at gnu.io.RXTXPort.sendEvent(RXTXPort.java:732) at gnu.io.RXTXPort.eventLoop(Native Method) at gnu.io.RXTXPort$MonitorThread.run(RXTXPort.java:1575) Caused by: java.lang.NumberFormatException: For input string: &quot;&quot; at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) at java.lang.Integer.parseInt(Integer.java:470) at java.lang.Integer.valueOf(Integer.java:554) at N64_Controller.serialEvent(N64_Controller.java:68) ... 8 more
Ignore this i had enabled debugging in the ardunio file and forgot to turn it off .
I've tried searching high and low looking for Processing 1.0, but with no success. Do you have any ideas where I could find it?
Great instructable! I've used it and it works great. I have found one troubling issue though, the analog stick is behaving like digital(being either on or off).
Great instructable! I've used it and it works great. I have found one troubling issue though, the analog stick is behaving like digital(being either on or off).
Okay so Im having a little bit of trouble working this out on my mac. I hooked up the controller correctly and check out the serial monitor, that seems to be working okay, I get a &quot;4&quot; for pressed, a &quot;0&quot; for unpressed and then the joy stick input, so I think the error is in the processing file. I am using processing version 2.0b6, I added the &quot;import&quot; lines and the only errors I get are: <br> <br>WARNING: RXTX Version mismatch <br> Jar version = RXTX-2.2pre1 <br> native lib Version = RXTX-2.1-7 <br>and something about a stale lock file, if anyone has any ideas, your help would be greatly appreciated :)
How do you change the controller pin? <br>I tried changing #define N64_PIN 2 to #define N64_PIN 13, but this seems to do nothing; the controller does not work on pin 13 but it still works on pin 2. <br> <br>The reason I ask is because I wan't to connect 4 controllers at the same time, allowing 4 people to control 4 controllers.
Well I found out how to change the pin number by changing the 0x04s in these values: <br>#define N64_HIGH DDRD &amp;= ~0x04 <br>#define N64_LOW DDRD |= 0x04 <br>#define N64_QUERY (PIND &amp; 0x04) <br> <br>to 2 raised to the power of the pin that you want (so if I wanted pin 4, I would put 2^4 which is 16. Make sure the 16 is in decimal, not hex though.) <br> <br>However, I want to add multiple controllers. I tried a few ways of doing this by changing numbers around values and stuff around, but what I have tried is unstable (player one always works, two sometimes, but can never go down, three is good 3/4s the time, and I have yet to have a problem with 4.) <br> <br>Does anyone know how to make the code stably support at least 4 players?
Finally got 4 controllers to stably work, if anyone wants the code and/or help making it work, feel free to contact me... in some way, pming me is probably the best. Thanks so much quasse for the code by the way!
Can you post your code?
Hi, im very interested in what yoou said, which arduino did you use?
Sadly, I used the controllers for a little bit, and they started acting up again... I will have to do some more tests and try more stuff out. I am using a Uno by the way. It is really odd since I can see no reason why one controller should affect another and why the code only likes certain controllers in certain slots...
I followed this guide and it worked well. <br>However, I wanted analog stick support, so I wrote a plugin for Project64 and other emulators. <br>The only thing that's missing is Memory Pak, Rumble Pak and Transfer Pak support (like the Adaptoid has) <br>I have no idea how to implement either of them and there doesn't seem to be much of help on google, nor can I find the source code of the Adaptoid plugin/driver, so if anyone could point me in the right direction that would be great.
Please, can you make it available as a compiled file? <br> <br>The source is very helpful, but I am running into problems when compiling it. <br> <br>Thanks
That sounds awesome, is your plugin posted online anywhere?
Oh, also, Rumble Pak support would be pretty easy to add. I would add it if I knew where my Rumble Pak was.
Here: http://dl.dropbox.com/u/8225581/ArduiN64.zip<br>Only one controller is supported at the moment, but adding support for more would be easy. Mempaks work however by letting the emulator handle them (but that means you can't use physical mempaks)<br>You will probably have to change the COM port in Controller.cpp to match your Arduino's COM port (it's hardcoded for COM4 at the moment, I would add a configuration dialog to choose COM port, but I'm not sure how to make dialogs in C/C++)
This is so fun to use with my atomic purple controller. The connector broke about a year back, and I haven't been able to use it with my real 64, and have been wanting to use it on the computer.
Just a hint :] ... <br>If it's an easy 3 wires to hook the controller up to an arduino, it's an easy 3 wires to plug it into your console.
Hey it&acute;s a verry helpfull instructable, but can you tell me the colours of the cables ( because on my old controller is`nt a plug)???? <br /> <br />Thanks woodmaster
im not really familiar with Arduino could you give me an idea of how to hook 4 controllers so i can play 4 player super smash brothers
https://www.instructables.com/id/nintendo-64-arduino-2-controllers/ works for two controllers
<a href="https://www.instructables.com/id/nintendo-64-arduino-2-controllers/" rel="nofollow">https://www.instructables.com/id/nintendo-64-arduino-2-controllers/</a>
Hey which part of the code do u add <br>&quot;import java.awt.Robot;&quot; <br>&quot;import java.awt.AWTException;&quot; <br>&quot;import java.awt.event.ImputEvent;&quot; <br>

About This Instructable




More by quasse:Use an Arduino with an N64 controller 
Add instructable to: