Wireless N64 controller project

Started by MarioReincarnate, April 15, 2009, 05:40:04 AM

Previous topic - Next topic

MarioReincarnate

Hey everyone... new to this forum so what up etc.

I've decided to take on a fun project to mod my N64 controller to become wireless.  Why, praytell, would you want to do that? you may ask.  A valid question indeed, but irrelevant.  The point is I'm doing it, and have decided to share the experience with all here.

I hope you will all help me out along the way, and maybe even join in the fun.

So let's get started...

---------------------------------------------------------------------------------------------------

Concept:
Take a wired N64 controller, chop off the wire, add some stuff, and out comes a wireless N64 controller.

I figure I'll need a couple PIC microcontrollers and either a pair of transceivers or two RX/TX pairs.  I feel radio is the most logical transmission method, but I would love to hear any debate on this.

I'd like to fit everything in the N64 controller's natural casing, though my friends have suggested ripping apart a rumble pak.  I don't want to do that because I want this to be a legit mod with complete functionality.  Plus it would be bulky.  I think the biggest problem here will be the power supply; I know that one guy made wireless NES/SNES controllers using an iPod mini battery... would love some suggestions on this.

Hardware:
a lot of stuff i don't have yet

Still researching the components I should purchase.  My goal is to get all the electronics for under $60.  Seems like I can get some transceivers for $10-15 and some PICs for around $10... power supply is something I'll have to think hard about.  iPod mini battery would be expensive compared to a couple AA's...

Software:
not there yet


---------------------------------------------------------------------------------------------------

Results will take a while; I'll be leaving my job in a few weeks so I'll have some more downtime then.  Until then I'll just be doing this in my spare time.

Please feel free to post comments, questions, ideas, sources, etc.

-MR

Link83

#1
Hi, I just wondered if you had any luck with this project  ???

I'm considering doing a similar thing myself but using a slightly different method. Considering the similarities between the GameCube and the N64 controllers I though id look into how complicated Wireless GameCube Controllers actually are.
Surprisingly in third party conrollers the RF circuitry appears to be a totally separate small PCB:-
http://www.takeitapart.net/archives/generic-wireless-gamecube-controller/

and it looks like the same might be true with the official Wavebird controller, but its hidden by the battery holder:-
http://www.flickr.com/photos/garyfixler/sets/72057594051163804/

Given both work using bi-directional serial signals, and that the signals must still go both ways (At least thats the case in the third party wireless controller, otherwise there would be no rumble support) then couldnt we just use the wireless modules from a third party wireless GameCube controller?

The N64 controller uses 3 wires, Data, +3.3V and Ground, but the GameCube uses 6 wires:-
http://int03.co.uk/crema/hardware/gamecube/gc-control.html
However 3 wires are not necessary. Theres an extra ground, +5V for rumble motor, and an 'unknown' which isnt used by official wired controllers (but might possibly be used by wireless controllers?)

So in theory couldnt we just wire the relevant pins from the N64 controller port to the controllers wireless receiever, and then use the wireless PCB module from the GameCube controller inside the N64 controller, powered by 3 rechargeable AA batteries (should give around 3.3-3.6V?)

Perhaps im just making it out to be simpler than it actually is, because if it were that easy I would imagine somebody else would have done it by now!  :D

MarioReincarnate

I say you try it that way and I'll keep going my way... just be careful with the power requirements

I'm going to do an update soon... I quit my job so I have some time to work on this now.  I am going to pick up the rest of the stuff I need this weekend so by early next week I'll start trying to rig up the circuit to test some code.  The code will probably take a big chunk of time, but I've got some good resources.

The only thing I haven't decided on yet is the battery.  I've been thinking of possibly an iPod Shuffle battery, but I'm afraid it wouldn't last more than 2 hours, and I need to figure out an easy way to recharge.  I'm also looking into some other Li-ion batteries with recharge circuits.  Then all I would need is a wall converter or even a dock if I get fancy.

Anyway, the more angles we attack this from the higher the chance of success.  Feel free to post your updates on this in this thread... and good luck!

MarioReincarnate

So I got most of what I need, but I'm starting to think I should have gone with two tx/rx pairs on different frequencies rather than two transceivers...

Right now I still need two 20MHz crystals, and I'd like to have an oscilloscope to see what's actually happening when I connect it up, but I'm making good progress.

The transceivers are too slow to switch from receive to transmit mode, so I'm thinking about getting two tx/rx pairs at different frequencies so I can always listen and transmit at the same time.  I'll probably order them when I order the 20MHz crystals.  I need to run fast enough to tell whether 1us bit is high or low... here's a little on the N64 protocol:

Each bit is 4us long, consisting of 4 "sub-bits" that are 1us each: start bit (low), two data bits (either both high or both low), and a stop bit (high):

    "1"              "0"
    _ _ _                  _
_|                _ _ _|

The N64 polls the controller using 8-bit commands.  The controller responds rather quickly with the appropriate number of bits.  This is the part I'm still fuzzy on.  Button status responses are 33 bits long (including stop bit), but I think other responses like for memory pak or rumble pak use have a response with a different length.

At any rate, when I have 200ns precision communication should be rather easy.  I just need to check for a falling edge, which only occurs at a start bit, then wait 1us to determine whether the bit is a "1" or a "0", then use the remaining 2us to send out the correct bit to either the transmitter or the N64/controller.  Done this way, there should be minimum lag... maybe on the order of under 10us.

Some problems I still need to work out:
1. Need the 20MHz crystals!  Can't test my code now at 500ns precision because I need to do more in a short amount of time.
2. Need a couple tx/rx pairs at different frequencies.  The transceivers will introduce lag of over 300us and I'd have to account for incoming and outgoing bits much more strenuously.
3. Noise.  I need to handle noise on the radio tx/rx pairs that could screw up transmission.
4. Battery.  I don't know what battery to go with... there is not a lot of room inside the controller and it's a pain to open, so I need to find a battery that lasts a long time and is small... maybe even rechargeable and I could add a jack.

Look I know I'm new and you guys probably aren't interested unless the project is complete, but I have made good progress and would appreciate any suggestions as fas as batteries and anything else.

I'm moving in two weeks so the next update won't be for a while.  Thanks for reading.

CZroe

I have always wanted to do this, but don't have the electronics / training to do what you have done so far.

My twin brother and I would both love to see this project completed, so we can duplicate it (and be grateful).

frontispiece

Hey MarioReincarnate, I'm trying to put together a wireless N64 controller myself, and so I'm really curious what you ended up discovering in the end?  Did you get it working?  I'm hoping to work with an ATMega running Arduino to grab commands from the N64, attach a controller ID tag, and fire it over to another ATMega which translates that back into a command to the controller, reads the controller's response, and sends it back to the N64-connected ATMega.  Do you think it'll be possible?

Did you get the 20 MHz crystals up and working?  And as for not being interested until it's complete, not me!  I'm interested at any point!

MarioReincarnate

Hey thanks for the interest!  I actually haven't made any progress since my last post... I moved then got married :E so I've been super busy.  I may buy what I need soon, but I don't know.

As far as your idea, I don't know if it will work fast enough.  Let me know if you need some help finding info on the N64 protocol.  Good luck!  If you make some progress maybe I'll get back into it!

frontispiece

@MarioReincarnate   Congratulations!  That definitely seems like reason enough to put the project aside haha.  I've been refining the idea and think I'm getting close, check out this forum if you're interested where I posted my design idea.  There are a few people over on that forum working on it now as well, so it'd be great if you decide to pick it back up with us!

As far as help: I could totally use a hand on the protocol beyond requesting button status.  I know that 0x0001 sent to the controller gets it to return its button status, but do you know what the other commands the N64 sends are?  (Rumble, mempack, etc.)

macabre

I'm not sure if it would be much help, but the circuit board inside of this adapter can take your n64 controller cable to a gamecube cable, which you can then work backwards (controller hack) a wireless gamecube controllers transmitter. Maybe you can fit all of this inside of the shell of a rumble pack?

You then have the controller done, and just need to adapt the gamecube controllers receiver to whatever system you were planning on using.


They also make an n64 to PC adapter that works by USB cable, and you can easily use that + any wireless PC or xbox controller + receiver in the same way (their cables are all special USB cables).


But, i'm hardly no expert nor should you take my advice unless someone that actually knows what they are doing doesn't see twenty flaws with my idea.