PSX Analog in and N64 Controller

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

Previous topic - Next topic

Ace

Quote from: micro on October 21, 2012, 02:57:38 AM
Hmm... To say the sensitivity is very low is not right imo. The range is +-80 steps and that is the same range an original stick in good condition will give you. As you've said in your previous post other sticks are highly oversensitive.
If you flash the microcotroller with my program you should get a stick that is not too sensitive. At the same time you should be able to get a full range in all games, for example running at full speed in Mario 64.

Apparently not.  I've installed AtMega8s in two controllers, one which has a GameCube analog stick and the other with a pre-made replacement analog stick, and the limits of the range are never reached on the GameCube analog stick, but the pre-made analog stick actually reaches the full range of motion.  It also requires much less movement, which is my big complaint with the GameCube analog stick.  Not only is the full range never reached, but the sensitivity of the stick itself is very low, meaning I have to move the analog stick quite a bit before I reach the limits of the range.

I personally use Star Wars Shadows of the Empire (Hoth mission), Star Wars Rogue Squadron, San Francisco Rush 2049 and Super Smash Bros. (character select screen) to test the analog sticks.  This is the result I get with each analog stick:

Original Nintendo stick:

-Shadows of the Empire: The Snowspeeder turns from side to side at a perfect 90-degree angle
-Rogue Squadron: Using an X-Wing, turning from side to side is very quick and tight turns are easy to pull off
-San Francisco Rush 2049: A clear separation between the tire marks from the front and rear wheels is visible when smashing the analog stick.
-Super Smash Bros.: Relatively fast cursor

GameCube stick:

-Shadows of the Empire: The Snowspeeder doesn't quite turn from side to side at a perfect 90-degree angle (slightly below 90 degrees)
-Rogue Squadron: Using an X-Wing, turning is a lot more sluggish and tight turns are much more difficult to pull off
-San Francisco Rush 2049: No separation between tire marks whatsoever, requires considerably more movement to reach the limit
-Super Smash Bros.: Cursor is noticeably slower in all directions

Pre-made replacement stick:

-Shadows of the Empire: The snowspeeder turns just like it does with an original Nintendo analog stick
-Rogue Squadron: Using an X-Wing, turning is just like on an original Nintendo analog stick
-San Francisco Rush 2049: Visible separation between tire marks
-Super Smash Bros.: Cursor is about as fast as it is on an original Nintendo analog stick

Either I've done something wrong or the POTs on a GameCube analog stick are not sensitive enough for use in a Nintendo 64 controller.

Quote from: micro on October 21, 2012, 02:57:38 AMOne thing about the pre-made GC-style replacement sticks: I love how easy the installation is and I like its look and feel. But imo they really suck. Every person has its own preferences and some may be annoyed by its lag and high sensitivity more than other persons. But when that lag and sensitivity are the causing some moves to be not executeable any longer (quick whirlwind attack in Zelda OOT), then that stick just sucks...

Honestly, I would much rather buy one of those replacement sticks and throw in an AtMega8 to replace the crappy microcontroller already on the sticks.  Yes, they are more sensitive, but I prefer the higher sensitivity of those sticks (except when stock as the skipping of steps is a big problem in Goldeneye; it's a pain to aim properly without using an AtMega8 or AtTiny24 on the sticks).

Sometimes, I think someone should actually sell pre-made analog sticks with AtTiny24s programmed with your code on it (and you'll get a cut of the profits, obviously).  I was actually thinking about this myself, but I don't have to means to make such a thing.

micro

Ace, now I think I know what you mean  :D
When I did my mod the first time I used the stick of a 3rd party GC controller. Public-pervert also successfully used several sticks from GC controllers, but I think those were unofficial/3rd party ones too...

So you're using the stick from an official Nintendo GC controller?
Normally potentiometer-based joysticks give out 0V to Vcc (3.3V in our case) when pushed all the way left or right. It's possible that your stick doesn't get all the way up or down voltage-wise. That effect may also be boosted by the restrictor gate. You can check if I'm right: Take a multimeter and measure the voltage at the potentiometer's middle terminal pin terminal pin while pushing the stick all the way left and right. Because you said you don't get full range I predict the voltage won't vary between 0V and 3.3V, but between 0.6V and 2.7V or something like that.
If that's the case then you can fix your range by simply tweaking the code a tiny bit:

'R will affect the range of X- and Y-axis (1024 * R / 128)
'R=20 means the range of each axis will be 160 steps (1024*20/128=160)
'If you drive Pinb.5 low (Pin 19), R will be 21 resulting in a slightly higher range of 168 steps
Dim R As Byte
R = 20
If Pinb.5 = 0 Then R = 21


Find the line that says "R = 20". Replace the "20" by a higher number like 30 or 35. ;D
If you can tell me the voltages you've measured at the potentiometer's middle terminals while pushing the stick to its boundaries then I can give you an exact number so your stick will have full range without beeing too over-sensitive.

micro

Quote from: Ace on November 15, 2012, 11:15:06 AMHonestly, I would much rather buy one of those replacement sticks and throw in an AtMega8 to replace the crappy microcontroller already on the sticks.  Yes, they are more sensitive, but I prefer the higher sensitivity of those sticks (except when stock as the skipping of steps is a big problem in Goldeneye; it's a pain to aim properly without using an AtMega8 or AtTiny24 on the sticks).

Sometimes, I think someone should actually sell pre-made analog sticks with AtTiny24s programmed with your code on it (and you'll get a cut of the profits, obviously).  I was actually thinking about this myself, but I don't have to means to make such a thing.

What a coincidence you made that remark ;)
I made a little PCB that will fit into the GC style replacement stick housing, have a look:


I used a different microcontroller and the code is different too (also written in C, not Basic). I also found a source for the potentiometer based joysticks so I can offer sets consisting of the PCB (microcontroller already pre-programmed and soldered on the PCB) and a new joystick (the orange part). This set is aimed at the people that are not satisfied with their GC replacement sticks but don't want to buy a programmer and fiddle with microcontrollers.

Installation into the replacement stick housing is quite easy. From the GC replacement stick you only need the plastic parts (housing and plastic cap) and the 6-wire cable which has to be soldered on the new PCB.

Ace

#163
Quote from: micro on November 15, 2012, 05:46:08 PMSo you're using the stick from an official Nintendo GC controller?

It's actually a mix of two different controllers' analog sticks.  The actual stick assembly is from a TTX Tech GameCube controller that broke (it was the only assembly I had that wasn't loose and I made sure to put a good bit of silicone grease on it so it doesn't loosen), but the POTs are from original Nintendo GameCube controllers.  Off-brand controllers use more sensitive POTs.

Quote from: micro on November 15, 2012, 05:46:08 PMNormally potentiometer-based joysticks give out 0V to Vcc (3.3V in our case) when pushed all the way left or right. It's possible that your stick doesn't get all the way up or down voltage-wise. That effect may also be boosted by the restrictor gate. You can check if I'm right: Take a multimeter and measure the voltage at the potentiometer's middle terminal pin terminal pin while pushing the stick all the way left and right. Because you said you don't get full range I predict the voltage won't vary between 0V and 3.3V, but between 0.6V and 2.7V or something like that.
If that's the case then you can fix your range by simply tweaking the code a tiny bit:

'R will affect the range of X- and Y-axis (1024 * R / 128)
'R=20 means the range of each axis will be 160 steps (1024*20/128=160)
'If you drive Pinb.5 low (Pin 19), R will be 21 resulting in a slightly higher range of 168 steps
Dim R As Byte
R = 20
If Pinb.5 = 0 Then R = 21


Find the line that says "R = 20". Replace the "20" by a higher number like 30 or 35. ;D
If you can tell me the voltages you've measured at the potentiometer's middle terminals while pushing the stick to its boundaries then I can give you an exact number so your stick will have full range without beeing too over-sensitive.

Thanks for this.  I still need to cut off a bit of the controller's original analog stick module as I get even horizontal range, but uneven vertical range (more range down than up), so once I'm done with that, I will measure the voltages I get out of the analog stick and report back.  I will then desolder the AtMega8, reprogram it with the modified code and solder it back into the controller.

Quote from: micro on November 15, 2012, 06:13:08 PMWhat a coincidence you made that remark ;)
I made a little PCB that will fit into the GC style replacement stick housing, have a look:


I used a different microcontroller and the code is different too (also written in C, not Basic). I also found a source for the potentiometer based joysticks so I can offer sets consisting of the PCB (microcontroller already pre-programmed and soldered on the PCB) and a new joystick (the orange part). This set is aimed at the people that are not satisfied with their GC replacement sticks but don't want to buy a programmer and fiddle with microcontrollers.

Installation into the replacement stick housing is quite easy. From the GC replacement stick you only need the plastic parts (housing and plastic cap) and the 6-wire cable which has to be soldered on the new PCB.

Now that is awesome.  All you need now is a mold for the actual analog module and you can sell pre-made replacement analog sticks with this PCB in it.  And if you have any of those boards for sale, once I get more of the existing pre-made replacement analog sticks, I'll be sure to buy a few boards from you.  I do like to mess around with various bits of electronics, but I like to keep things simple as well, so anything that would make it easier for me is welcome.

public-pervert

Micro, you keep blowing my mind! These boards looks so beatiful!

Also, I'm a lot curious if you'll make the new code available and what microcontroller is that?

Paar

Quote from: micro on November 15, 2012, 06:13:08 PM
Quote from: Ace on November 15, 2012, 11:15:06 AMHonestly, I would much rather buy one of those replacement sticks and throw in an AtMega8 to replace the crappy microcontroller already on the sticks.  Yes, they are more sensitive, but I prefer the higher sensitivity of those sticks (except when stock as the skipping of steps is a big problem in Goldeneye; it's a pain to aim properly without using an AtMega8 or AtTiny24 on the sticks).

Sometimes, I think someone should actually sell pre-made analog sticks with AtTiny24s programmed with your code on it (and you'll get a cut of the profits, obviously).  I was actually thinking about this myself, but I don't have to means to make such a thing.

What a coincidence you made that remark ;)
I made a little PCB that will fit into the GC style replacement stick housing, have a look:


I used a different microcontroller and the code is different too (also written in C, not Basic). I also found a source for the potentiometer based joysticks so I can offer sets consisting of the PCB (microcontroller already pre-programmed and soldered on the PCB) and a new joystick (the orange part). This set is aimed at the people that are not satisfied with their GC replacement sticks but don't want to buy a programmer and fiddle with microcontrollers.

Installation into the replacement stick housing is quite easy. From the GC replacement stick you only need the plastic parts (housing and plastic cap) and the 6-wire cable which has to be soldered on the new PCB.

That looks promising. Could it be used together with your original thumbstick mod? Gluing the PCB to the plastic housing is a bit clumsy. One more question - I already have a JDM programmer and don't want to buy another if not necessary. Is it possible to somehow use your code with JDM compatible microcontroller?

wwwyzzerdd

#166
Sweet pcb boards, are you selling?

Quote from: micro on November 07, 2012, 11:59:29 PM
So what's exactly your preoblem, wwwyzzerdd?

Do you also think the sensitivity is too low?
Or dou you also have the weird problem with the cursor drifting to one side?

The cursor was going crazy.

It was the power source I used during programming, reprogrammed it with a good battery hooked up and all is good now, I did have problems with sensitivity, but that was just the hole for the stick not being big enough


Kupolski

Hello! I've been following this thread for a while and seem to have the worst timing imaginable. On the same day micro's PCBs were sold out, later I had a chance to grab two of these chinese pre-made Sticks. I'm currently waiting for them to arrive, and will test them out. Although I'm looking forward to having them, I have a feeling that I won't be completely satisfied, based on the research you all have done.

Ace, you tried to directly replace the microcontroller on these pre-made sticks, correct? How much work was it to do so, and from a beginner's perspective, would this be a feasible project? It would mean a lot if I could get some initial assistance :)

From what I gathered, this would mean to grab an AtTiny24 or AtMega8, desolder the microcontroller from the prefabbed PCB, program the new microcontroller with the code from this thread and then, using wires, solder it to the right connectors on the pcb?

Which brings me to my next question: Which code did you use, and did you have to modify it to accomodate the different microcontrollers?

Thanks in advance :)

ste2425

Hey guys signed thanks to this brilliant thread.

I know its incredibly old now and usually i refrain from posting on such old threads but wanted to ask. Does 'kylejw' have his source up on GitHub or something of the like?

I've seen his Google Code repo and that is rather old without any updates, plus it doesn't have any actual source, just the built HEX.

Half way through the first page he posted his refactored code and a slightly different pinout to use it. I was thinking of creating a GitHub repo referencing this thread and his Google Code repo but include the refactored source he included as well as the newer pinout.

Seem's a waste to put so much effort into creating this for it to just get lost in a forum post. Especially if this place cleans up old threads, or moves servers etc and it gets lost.

So yea, its great having a analogue stick that actually works now!

kylejw

ste2425, my apologies for this reply 5 years later - but in case you're still interested, or someone else comes looking:

https://github.com/kylejw1/n64-joystick-translator

I have some of the ebay replacement sticks and in my very biased opinion the DIY solutions (not just mine) are better.