PSX Analog in and N64 Controller

Started by kylejw, February 13, 2009, 06:43:31 PM

Previous topic - Next topic


Wrote up a little document, haven't gotten a chance to review it so I hope theres no mistakes.  Schematics for the board will follow since this doc is sort of useless without them...


Very nice pdf guide kylejw :)

I considered using the Wii Classic Controller but didnt think the octagonal gates would fit correctly in an N64 controller, but nice to see I was wrong! How do the Wii Classic Controller's analog sticks compare to the GameCube Controllers analog sticks? and what about the difference between the raised/flat octagonal gates?

I like the little PCB you used, do you mind if I ask where you got them manufactured?

Also looking forward to hearing more about your dual analog N64 controller ideas/plans ;)


I'm pretty sure the gamecube sticks are the exact same part.  They feel identical.

The gate I can't provide a good comparison... If you look at the grey/orange controller in the PDF it uses an original gamecube stick, but if you look close you can see I didn't make it flush.  I made a controller with a third party stick that was flush and didn't like the feel.  I prefer the stick lower down, so the Wii gate actually works perfect for me.

The dual analog... I did it but had to salvage the chips.  I used third party sticks in it and they ended up being really sensitive and 'springy'.  You can probably tell I'm really a fan of the authentic sticks :).

Also, GoldenEye's control settings arent perfect... if I were to redo this, I'd probably have to swap the horizontal axis of stick A with the one from B, or the verticals.  Some combination would work, but it would take some tweaking to get it like XBox/PS games are.

Here's a pic anyways, I had to cut some plastic off the bottom to fit it. 


Oh and the PCBs are from BatchPCB.  They take a while (5 weeks for these) because they wait to fill up a panel with orders, so it's like a group order that they get made in China.  The silk screening, solder mask, individual cutting is all included in the price. 


Wow, that dual stick controller looks awesome :D

@Link83: To connect a AVR to the serial port of a PC you'd need some more components like max232 level shifter, 3.3V voltage regulator...
But it would be great if you could get hold of that N64 controller demo.


right now im waiting for the stk200 cable, gamecube controllers and some atmega8 ^^.
ill post pictures when my is finished too ^^



question (especially for micro) the GC sticks are 2k ohm, can i use a 10 kohm stick, with your attiny24 program ???

so i can order them instead of destroying a GC controller...

thanx in advance!



i'm going to try it, ill post if it works!


Hey kylejw, nice work! I'm just wondering if you had any of the PCB's you made for this mod and/or pre-programmed chips you'd want to sell? I'd be interested in buying a few if you do. Otherwise would you please be able to provide the schematics for the board you made? I signed up to this forum specifically for this post! your amazing :D


Quote from: lucidPerspective on August 26, 2010, 12:27:23 AM
Hey kylejw, nice work! I'm just wondering if you had any of the PCB's you made for this mod and/or pre-programmed chips you'd want to sell? I'd be interested in buying a few if you do. Otherwise would you please be able to provide the schematics for the board you made? I signed up to this forum specifically for this post! your amazing :D

You have a PM.


Rough webpage here containing the source, precompiled binary and schematic


nice site, kyle! and nice to see you selling those pcb's, but right now i have the GC sticks and some atmega8 in hands  ;) but if i want to upgrade more controllers ill certainlly buy some of those pcbs  :)


Sorry guys, I can't believe I messed up the pinout of the ISP socket. :-\

pin 3 = reset
pin 5 = not connected

pin 3 = not connected
pin 5 = reset

I also corrected the pdf guide:

@public pervert: I hope it works now!


thanks micro! ill try today and post my experience here! thanks a lot =)


Just so people know, you don't have to do this mod if you want a Gamecube or PS1 style analog stick on your N64. NintendoRepairShop has "New" N64 analog sticks for $10 and I bought one. When I recieved it I found it was not like an N64 analog stick but was actually more like a Gamecube one. It hooks right in like an original though and works. I popped it open and found that it actually has the same mechanism as the Gamecube/PS1/PS2/Xbox/360 analog stick. So if you want that feel this could be an easier option.


What's the bet some chinese company saw this thread, and implemented your guys code + PIC chips inside the analog stick :o


+1 on the pics, very curious what pot they used... Seems like normal pots are too high to keep the 'deep' look of the original stick.


I barely could get it open really. They didn't use screws the glued it shut. I had to use a scratch awl to break the seal and pop it open and I still couldn't get it to open very far (like half a centimeter) with out the fear of breaking it. From what I could tell it looked like the same kind of pot used in the 360 and Gamecube style controllers and it just came out with wires that connects directly into the N64 controller board.

Here are some pictures from the outside though:

If I can get it open better I'll take some internal pics.


Very curious for internal pics... may buy one myself just to see what's going on in there.

One of my controllers is up on eBay if anyone's interested:


Quote from: lucidPerspective on September 20, 2010, 07:02:59 AM
What's the bet some chinese company saw this thread, and implemented your guys code + PIC chips inside the analog stick :o

That's not likely. It's probably a part from the knock-off N64 controllers which have for sale (link on the main page to the right).


Quote from: micro on July 28, 2010, 12:48:37 AM
Ok public-pervert, first of all you'll need the ATMega8. I've got 2 or 3 of them left, I could send you a preprogrammed one. Just send me a private message.

You said you wanted to use the stick of a Playstation controller, right? Open the PSX controller and cut out one stick from the pcb. You'll end up getting something like this:

On the back side, solder 4 wires to the stick: VCC, GND, X-Pot & Y-Pot.

Now it's time to open the N64 controller and remove the stick unit. Just look at the kylejw's pictures. Once you removed the stick unit, open it and throw everthing out of it. You'll just need the housing of the stick unit. Also you'll need to make some space, take a dremel, knife, plier and/or sand paper to remove the bits of plastic in the stick unit housing that are in your way.

Now comes the difficult part. Take your PSX stick with the 4 wires and attach it into the stick unit. Route the 4 wires out of the unit, on the backside there should be an opening through which you can put the 4 wires.
I used hot glue to position the stick. Getting the stick fitting right takes VERY long. You always have to put the stick unit into the N64 controller and make sure the stick is centered right. If it's not, use a heat blower gun to make the hot glue liquid again and reposition the stick, again and again until the stick sits right.
There is no easy fool-proof way, it's all about trial & error. And because of that it's important to use hot glue and a heat gun :)

Here you see a picture of my Gamecube stick:

Yes, it looks like a mess!

To make things worse you'll also have to think about the bezel for the stick. The bezel also has to be fitted right so it won't be in the way of the stick.
For my Gamecube stick I glued the octagonal shaped bezel to the controller and I didn't use the top half of the stick housing at all, it wasn't needed.

Kylejw on the other hand glued the bezel directly onto the stick unit housing. You see, you'll have to try for yourself :D

But once the stick sits right in the stick unit, just wire up the stick with the ATMega8 and the N64 controller PCB. Just look at the 3 pin outs, it's straight forward:

The only extra components you'll need is a 10kOhm resistor and a 100nF ceramic cap. Both are very common & cheap, I got plenty of them. As I said send me a private message if you'd like me to send you the components.

QuoteI just have two questions if you dont mind:-
- Does your code work with any analog stick, or do they have to use a certain pot value? (Really hoping to use a broken official GameCube controller)
- Is the sensitivity set to about the same level as the original N64 analog stick?
I think the pot value isn't THAT critical, I assume they're all 10k (?)
Sensitivity now is about the same level but of course it feels different.

The original N64 stick was always a little hard to move, these days analog sticks are much easier to move.
Link, have you ever played Ocarina of Time on the Gamecube? It was on the bonus disc of Wind Waker. When I played it back in '03 or '04 I was really stunned by the improved visuals. But then I had serious problems aiming with the bow and the slingshot. I almost couldn't win the bow mini game in the city. N64 and Gamecube stick just aren't the same.

I had similar experience with N64 Ocarina of Time and my N64 Hori Mini Pad.

The Mini Pad featured a GC-style stick. The pad was ok, but really small. If I hadn't sold it a year ago I could check how many steps it had for the X- and Y-axis :(

Hello, you can post again the pinout from AVR, ty

br samusprime


@Samusprime: Hmm, I don't understand what you mean... Why are you quoting the whole text & pics?  :P All the pinouts & schematics are  included in this file:  GC_PSX_stick_in_N64_controller_v1.1

The Nintendorepairshop stick looks very good. Although it seems the stick is entirely made of plastic without rubber on the top.  IMO that was also a problem of the original N64 and Dreamcast stick, the sticks could get pretty slippery during the battle :D
So what's your conclusion, are those sticks worth 10$?


anyone else got micro's method working yet?
i cant get the stick to respond at all, however i finally managed to program/flash the attiny's 24's


So what was the problem with the programming?

If you can post some (good) pictures maybe I can see if there's something wrong with the wiring.


Still no idea what the problem is with the programming, i ended up buying this
and hard wiring the pin appropriate pins.
worked fine after that
ok picture of analog wiring:

Uploaded with

does the potentiometer/analog stick used have to be a specific resistance, i've tried three with no luck.


Potentiometers up to 10k should be fine.

So you get absolutely no movement? The picture isn't very sharp... The cap betweeen GND and VCC looks kinda strange. Is it a ceramic cap? Remove the cap and look if there's any difference.
I can see that your stick is still attached to the pcb. Make sure that pin 1 and 3 of X and Y pot are connected to GND & VCC (or vice versa). The pic is really blurry but it seems the traces that connect pin 1 and 3 for both pots are cut so you really have to make sure you got GND & VCC on pin 1 & 3....


absolutely no movement
checked all the connections, everything is going where they should be, no shorts,
however once power is provided to the system my multimeter tells met that all pins are connected to each other. wierd.
that green thing is the capacitor, not a ceramic cap one, tried ceramic caps also.
removing the capacitor had no effect

i noticed just now that the programmer board (url above) doesnt appear to have 10kohms between pin 1 and pin4, however bascom identifies and seems to program the microchip fine


This is getting REALLY ridiculous now! I wanted to program another ATtiny24 using my own guide and then I found ANOTHER error in the programming schematic. And this time it's a pretty big mistake, MOSI was going to the reset pin and reset to MOSI.  I guess this was the reason why you couldn't program yur ATtiny24's. I can't explain how that could have happened...

Anyway, here's the corrected guide, I've also deleted the old one.

Blaze, so you got a different problem as your AVRs are already programmed. So I'm gonna tell you how you can test if the AVR is working right:

First provide power to your AVR. Leave out the cap for now but you need the 10k resistor between VCC and reset. If the reset pin isn't held high, the AVR won't run.
You can use a 3V battery or you take the 3.3V from the N64 controller, doesn't matter.

Next you provide VCC & GND to only one pot of the stick. Now you can take your multimeter and check the voltage of the middle pin of the pot. When the stick is in neutral position you should get roughly half the voltage of VCC. If you don't get any voltage at all then there's something wrong with the pcb of the stick.

Then you connect a wire from the middle pin of the pot to pin 8 of the ATtiny24. When you're moving the stick now pin 9&10 of the AVR will constantly toggle between logic 0 and 1. So now you take a simple LED and connect the short wire to GND and the long wire to either pin 9 or pin 10, it doesn't matter. But you'll also need a resistor for the LED as 3.3V is too much for a regular LED. Take a 75 or 82Ohm resistor.

Now the whole setup should look like this:

When you move the stick now you will see the LED blink. The slower you move the stick the slower the LED blinks. So if you see the LED blink, everything should be fine.

BTW, Super Mario 64 is great game to test the stick as you can see the cursor moving.


hmm tried the testing, the voltage between the middle pin of the pot is fine.
however no blinking led, i tried another microchip, freshly programmed. and like the other one it appears that pins 9&10 are both shorted to ground.
more chips should be arriving this week to test on.
thanks very much for all your work


Hmm, why do you think pin 9 & 10 are shorted to ground? Did you measure the resistance between GND and 9 & 10 or did you just read the voltage on pin 9 & 10?


i used the multimeters short tester , also pins 5 & 6 are shorted to ground


Quote from: kylejw on August 08, 2010, 12:09:12 PM
Wrote up a little document, haven't gotten a chance to review it so I hope theres no mistakes.  Schematics for the board will follow since this doc is sort of useless without them...

hello, where i can buy the printed circuit????


Quote from: blaze3927 on October 03, 2010, 10:15:19 PM
i used the multimeters short tester , also pins 5 & 6 are shorted to ground

So you did use the continuity test function of your multimeter? Did you test continuity when the AVR was still running? Afaik you should test continuity only when the device to be tested is turned off.

Pins 5&6 and 9&10 are the 2 output pins for each axis. The pins constantly toggle between GND and VCC voltage as you move the stick and at some point both pins are at GND level, that would be normal.

You said the voltage on the middle pin of the pot is fine. So I guess the voltage rises and falls as you move the stick, right? If not, then there's something wrong with the wiring of the pot.

Quotemore chips should be arriving this week to test on.

That won't help I'm afraid. I mean you said you programmed the 3 ATtiny24's with Bascom successfully. So Bascom verified the code and if you didn't get a error message during the flashing process you got the right program running on your ATtiny24's. I also don't think that all of your three AVRs are broken...

I see you got the SOIC version of the ATtiny24. I guess you didn't buy used ones, did you ;) You could check again the fusebits, they should look exactly like the ones on my screenshot (especially clock and watchdog timer fusebits)

Blaze, you're so close, you're gonna make it :D


Okay when moving the pot voltage does change, will check fuse bits and will try for that blinking led again 8)
Read the chips rom, and this is a print screen of the fusebits:

Uploaded with

it looks like im using a slightly different program to you and that the only other difference i notice is the calibration number, yours is 4c whereas mine is 54.
any problem there?


tried again, still no blinking LED


Your fusebits look fine. Different calibration is normal, too.

I'm really clueless...

So you have the 10k pullup resistor between pin 1 and 4, I could see that on your pic. So if your LED isn't busted and you paid attention to the polarity and the LED resistor, your LED should really blink when you're moving the stick.
Of course, your ATtiny24's could be broken, but all three of them...?


(Yay first post! :D) I have a n64 controller here with a nearly dead joystick, and this sounds like an awesome idea. I have no experience with AVR or raw PIC controllers, but I have a PICaxe 18X sitting here that I think will do the job. The technical faq says it can read 10-bit adc (or 8-bit), and the minimum operating voltage is 3volts. I haven't tried the thing at 3 volts, so I have no idea if it will work.

So, a couple questions:

  • Is there a minimum frequency I need to hit to sample the joystick frequently enough? This picaxe defaults to 4mhz, but I think I can get 8 or 16 also.
  • What is the general flow of the program? (In english for my non-programmer-trained brain :P) Nevermind... I can read your code well enough to tell. Thanks for all the comments. :)

You'll have to forgive me for being such a noob... I have very little experience with microcontrollers and pretty stone-age tools to work with.

I also don't have a donor joystick at the moment, so that will have to wait until I can find one at the thrift store or make my way out to a gamestop. (Don't want/can't afford to buy a brand new controller) I'll release my code and schematics when I am finished here also. :)

Ok... looking through your code, it looks like I will have to create a "rotate" function using shifts. Also: I am assuming "Portb.1 = Xwheel.1" is setting that pin to the right-most bit on Xwheel? (Or LSB)
Sorry... this is my first time actually trying to make my PICaxe do anything and I'm completely new to working with bits and bytes on this level. Just hang with me on this one. :P


A PIC 18F should be able to do this project many times over :)  It has more than enough resources.

Since it appears you're using micro's code I'll let him answer your questions, but with regards to the sample rate, I run at 8MHz clock and it samples plenty fast enough.  I never did any measurements due to lack of proper instruments, just assumed that my thumb would be slower than a thousand samples per second :)