PSX Analog in and N64 Controller

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

Previous topic - Next topic

micro

Quote from: Sharn on October 08, 2010, 04:55:30 AM
EDIT:
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

Actually xwheel.1 is the 2nd bit, xwheel.0 would be the LSB  ;D  But it doesn't matter, you just have to take 2 neighbored bits on the xwheel byte ike 0&1 or 1&2, 3&4 or even 7&0.

I agree with kylejw. My AVR's run at 8MHz too, more than fast enough for that job. :)

Sharn

Alright guys... an update. I've been slaving away at this for a bit, and I have some code that should, theoretically, work. I cannot test it yet, because I am lacking a joystick, and I need to re-make my serial cable for my picaxe and use a more advanced version to get more stable ADC readings while testing.

Thanks micro and kylejw, I used pieces from both. I first attempted to use the virtual wheel micro used, but with rather limited ram (14 bytes...), and no shift function, and certainly no rotate, not to mention extreme lack of experience, kylejw's "state machine" seemed much more simple. I have the "extended range" by having the joystick pressed far one direction horiz.

Like I say, without actually field testing it, I have no idea if it will work. If you guys could take a quick run-through and bug check it for me mentally, I would appreciate it. I also might mention that I think this project could get on hackaday if we tried. ;)

kylejw

Just looked at it very briefly, looks like you used Xread and Yread in sendpulses(), when it should be Xsteps and Ysteps?

Otherwise it looks good to me

micro

I noticed two things ;D
1.)
In main: you got xsteps and ysteps and you calculate how much steps you gonna have to go. But in sendpulses: you don't pay any regards to the amount of steps. I guess in line 56 you actually confused xread & yread with xsteps & ysteps. But then you still have to in- or decrease xsteps&ysteps after each step made.

2.)
If I got it right then you want to activate the extended range if the analog stick is moved to the right during power up. Well, you can't do it that way because then you would have a wrong initial value for your stick. You want the stick to be in neutral position when you sample it for the first time.
I understand that you only got 4 input pins on your picaxe. So I'd recommend to forget about the extended range for now.

I'm no PIC guy, but it seems your picaxe 18x actually is a PIC 16F88, right? If I were you I would forget about the whole picaxe thing and get a decent BASIC compiler for PICs to use the full potential of the 16F88.
Then you would have additional input pins and you could also use the rotate function which is a lot faster than working with states and using a ton of "if..then..." conditions.
At first I also did it that way until a had the sudden inspiration to simply rotate the wheel left or right :) It's just so much faster and simpler.

Sharn

Hey micro.. thanks for the post. kylejw also mentioned the point where I confused read and steps, which I have now fixed in the code. I actually have 1 more ADC/digital and 2 digital inputs unused, so I'm not really concerned about inputs... I actually could use one for the extended range if I wanted to.

I may be misunderstanding how the ADC works. I set X/Yold values in my main loop, so the only values I use to check if extended range is desired are X/Yread, which get over-written every loop anyhow. Unless you mean that ADC will take the first value that is read and use it as the middle or reference value..?

Does the pot in the joystick give the uC a full voltage range from 0-3.3 volts, or is it just a small range in there somewhere?

You're right that I didn't in/decrease X/YSteps, fixed that. If I had a joystick, I would probably be using trial and error to work out the last of the bugs; it's the only thing holding me back now.

Also: I probably could have implemented the wheel, but I was low on ram (I think), and I would have had to shift manually, and ensure that I didn't lose the digit that got shifted out. Too much work for now. My code is fairly modular, so it shouldn't be hard to change later if I figure out a way to do it easily.

I would have used a raw chip but:

A. I already had this picAXE from past tinkering
B. I don't want to buy any software or hardware to program chips (For the moment, out of a job :P)
C. picAXE basic is fairly well-documented
D. Finally, I think the more ways there are to do something, the better.

Sorry for such a long and boring post, and thank you for all the help. I've attached my latest code here. I think I took care of the bugs you both pointed out. (Until you can clarify a little on pushing the joystick right at startup...)

micro

Sharn, no problem. I fully understand that you want to work with the stuff you already got :)

The middle pin (wiper) of a potentiometer actually touches the GND and VCC pins as you turn the pot all the way left or right. So the pot will give you the full range of voltage from GND upt VCC.

And yes, at the very beginning you should read x and y pot and store the value as Xold and Yold. You can't just set the initial value to 80 or 79. You always have to read these values. It may be possible that the stick will give you 76 or 83 even though it's in neutral position. And with the years the stick gradually gets worn out too...

The only way you could do it without an additional input pin is to read the stick, check if the stick is pushed right, activate extended range if so, then wait 2 seconds or so and read the stick again for the initial neutral values.
I think kyle also did something like that to choose different deadzones iirc.

Another thing you should pay attention to are the different data types you've chosen for your variables.
In my code I've used integer variables because with signed numbers it's easy to calculate the steps you have to make (negative and positive).
But you're using bytes and words for your x and y variables. I don't know a thing about the picaxe compiler but if the bytes and words aren't signed then you'll run into problems when you're calculating your steps that way.

One thing about the rotate function again:  http://ww1.microchip.com/downloads/en/devicedoc/30487c.pdf
According to the datasheet (page 157) the 16F88 has the instruction for rotating a byte left or right, single cycle execution. If you allowed to use asm in your picaxe code then you can implement the rotate function too. But I do agree with you that that's something to work on later maybe :)

I'd say it's time to get yourself an analog stick and try out your code  8)


Sharn

Alright... I understand that now. I also see what you mean with data types also. I forgot that X/Ysteps must be negative, so a byte will not satisfy that.. I'll have to come up with some sort of solution. Lemme think on that one.

A friend just gave me an old wireless xbox controller that died on him, so I'll take a pair of wire cutters to the board and see what damage I can do. I'll let you guys know my results.

Thanks again for all the help. -crosses fingers-

micro

Good luck!  :)
But one more thing: if the default values of Xstate & Ystate is 2 then you should also set Xoa&Xob/Yoa&Yob to the according levels at the beginning.

Sharn

Thanks for another reply. The picaxe automatically sets all outputs to low upon startup, so state 2 is where it should be at... however, I realized my code only allows for one-way movement right now... Ugh. I may try to find a way to use a wheel as you did. You're very much right that it would be much more simple and clean.

Now... my problem is, it seems, that two legs of my potentiometer are shorted together for some reason. (On all of them... O_o) I don't fully understand how it's supposed to be used, but that doesn't seem right. Between either leg and the third there's a stable 9.34K when centered... (10K pot) I guess I'll unsolder the whole thing and check what's up.... (I think for some reason the two legs are held together on the board.. they wouldn't read resistance to check the location, would they? The "third leg" seems to go to the little black blob processor on the board.)

micro

Maybe there's another easy way for you without rotation. Let's take a look again at the gray codes for moving up:

phase   AB
100
201
311
410

So if you want to make 1 step forward you could check if both outputs A and B are the same (00 or 11). If that's the case then you want to toggle B.
If A and B are not the same (01 or 10), then just toggle A.

If you want to make a step backward you just toggle A if A=B or toggle B if A!=B. That's very simple too.  8)


About your stick: That's kinda strange, usually the pots of your stick should look like this:


Usually pin 1 and 3 of both pots are connected (pin 1 with pin 1 and 3 with 3) but not 2 pins on the same pot. But you're right it's probably best to unsolder the stick and check again.



Sharn

#90
Ok... another roadblock. I finally got a joystick unsoldered (Let's just say... I either need more practice with solder wick or to buy a solder pump..), and have it hooked up. With my picaxe in debug, and the joystick centered, I get a good steady reading at 500 or so, roughly 79-80 after the range conversion. I have a full good range up to 160 pushing the stick one way, which increases the voltage. The other way, however, has about 10 degrees or less of movement before it's shorted to ground and I get a reading of ~0... Measuring it with my meter, the voltage drops to mA barely pushing the stick that way.

I'm almost certain I have everything hooked up properly now, and my DMM shows it's most likely not a software problem. Could it just be the way this joystick is designed? (Since it was hooked up weird on the board...) Here is a picture of my setup:



Ignore all the caps.. I salvaged a few and had nothing better to do with them. XD Could I try a voltage divider with only one pole of the potentiometer maybe?

micro

That's strange. Normally that's the way to wire a potentiometer as voltage divider. You could try the other axis, maybe there's dirt or something like that inside that pot.
Before the conversion from 1024 to 160 steps, do you also have only 10 degrees before you already reach 0?

blaze3927

new microchips arrived,
programmed, locked and fused, installed, double checked pinouts/connections
still nothing, tried a different analog/controllers/potentiometers aswell/, however now the controller stick on the n64 seems to drift down, as opposed to the old just staying still.
will try the led test tomorrow

micro

Blaze, you're really making me insecure  :D

I also tried my code again. I programmed the ATtiny24 again, checked the fuses, even took a different stick and hooked up everything exactly as described in my pdf guide. I took Mario64, plugged in the controller and the stick worked instantly!
So the program is definitely allright.

I also don't know what you might have done wrong. If your sticks are still on the PCB you could unsolder them and try again without the PCB...

Sharn

#94
@blaze: I don't know how hard it is with AVRs, but with my picaxe, it's super easy to return serial info to the computer. I would be completely lost if I couldn't. I would suggest finding a way to do that so you can see what's going on in the uC step by step.

In other news, my joystick is still being stupid... very little range one way. I'll try the other axis sometime today hopefully, but I'm not going to get my hopes up. This was a cheap madcatz mini wireless, so maybe it's just a junk joystick...  I took the pot off the joystick because I could and then just got completely sporadic readings... I'm guessing these pots need some consistent external pressure on the "wiper." (If that's the correct term)

EDIT: Alright... just tested the other axis, and it works perfect.. full 0-160 range. I'm pretty excited :D I'm going to attempt to transplant one of the pots off of the other joystick and see if it works also.. Then I can un-cripple my code, and give it a try hooked up to the console :)

EDIT 2: Two pots hooked up with seemingly good readings... Gonna mess with the code a bit more and make sure everything is working as it should, then I'll interface it to the controller and give it a try.

EDIT... 3!: Well... going to have to re-think how I calculate steps, as it seems picaxe is really terrible at working with negative numbers. I have a (really simple) solution in mind though... (Use Xold and Xread directly, rather than subtracting first.)

kylejw

Wow a lot of action since I last checked in.

I'm liking the rotate function, didn't know PICs had that (I guess that's what I get for not reading the datasheet).  I think I'll leave my code alone though, works just fine as it is.

One thing I left out of my design is filtering caps, I decided the controller probably cleans up the power good enough :p  I do wonder if a simple low pass filter might give any benefit though, maybe something to look at with an FFT.

As for the joystick having bridged legs, this likely means that there is only a ground point, or only a power point on the joystick board, and the rest of the circuitry is back on the controllers board.  That way, you can have a dual axis joystick connected with only three wires.  The idea is to turn each pot into a variable resistor.  I believe this is required when people put new joysticks in 3rd party N64 controllers (such as the Horipad?).

blaze3927

@sharn, i am very new/noobish at microchips, im not sure if it would make it any easier for me :P thanks anyway

@micro- i reinstalled bascom and tried programming, what i forget to mention that happens in the programming process is that after writing the program to the chip it reads it/verifies it and then says difference at 0000. but i thought that was due just to the lock and fuse bits, as once i turn divide clock by 8 off then reprogram it doesnt come up.

micro

@kylejw: Ah I see. But personally I haven't seen a controller with stick pots used as variable resistors yet.

@blaze: If bascom says that there's a difference then you immediately program the chip again until you don't get a error message. Writing the fusebits doesn't flash the AVR with the program.

Sharn

#98
EDIT: Well... turns out the the code is too slow even with the pause completely gone. I guess I'll be looking into a much more efficient method here, as going from one side of an axis to the other still takes well over half a second. =\ Maybe this processor just doesn't have the oomph... I'll see what I can do though. I'm fully open to suggestions. /EDIT

Mine is nearly all together now, and (mostly) functioning. I put a pause 10 in though, which is far too long. (10,000us, compared to 10) Turns out the picaxe 18x I'm using doesn't have the pauseus command that the newer models do.. So, I'm curious... did you (micro specifically) test this code without the short pause between pins changing? I'll try without a pause at all, and if that doesn't work I'll throw in a simple equation to slow it down or try 4Mhz. Here's my code if you guys would like to look: (I hard-coded the pins as it should be slightly more efficient)

#rem
Beta code by Brandon Hartshorn to use a resistance-based joystick
in an OEM Nintendo 64 controller.

Ver0.4
#endrem

setfreq m8
symbol Xjoy = 0
symbol Yjoy = 1
symbol Function = pin2
symbol Xoa = 7
symbol Xob = 6
symbol Yoa = 5
symbol Yob = 4
;add symbols for outputs
symbol Xstate = b0
symbol Ystate = b1
symbol Xread = w3
symbol Yread = w4
symbol Range = b11
symbol Xolder = b12
symbol Yolder = b13
symbol Xold = w1
symbol Yold = w2

goto setup

main:
let Xold = Xolder ;set (soon to be) old values
let Yold = Yolder
gosub curjoy ;read joystick and convert to 0-160
let Xolder = Xread
let Yolder = Yread
gosub sendpulses ;send pulses for both axes
if Function = 1 then: goto togglefunc: endif
goto main

setup:
let Range = 20
let Xolder = Xread
let Yolder = Yread
let Xstate = 2
let Ystate = 2
do
wait 1
gosub curjoy
let Xolder = Xread
let Yolder = Yread
loop until Xolder <> 0 and Yolder <> 0
goto main

togglefunc:
pause 100
if Range = 20 then
let Range = 21
elseif Range = 21 then
let Range = 19
else
let Range = 20
endif
return

curjoy:
readadc10 Xjoy, Xread
readadc10 Yjoy, Yread
let Xread = Xread * Range / 128
let Yread = Yread * Range / 128
return

sendpulses:
do
if Xread > Xold then
if Xstate = 0 then
high Xoa
elseif Xstate = 1 then
low Xob
elseif Xstate = 2 then
low Xoa
elseif Xstate = 3 then
high Xob
endif
if Xstate >= 3 then
Xstate = 0
else
let Xstate = Xstate + 1
endif
let Xread = Xread - 1
elseif Xread < Xold then
if Xstate = 0 then
high Xob
elseif Xstate = 1 then
high Xoa
elseif Xstate = 2 then
low Xob
elseif Xstate = 3 then
low Xoa
endif
if Xstate <= 0 then
Xstate = 3
else
let Xstate = Xstate - 1
endif
let Xread = Xread + 1
endif

if Yread > Yold then
if Ystate = 0 then
high Yoa
elseif Ystate = 1 then
low Yob
elseif Ystate = 2 then
low Yoa
elseif Ystate = 3 then
high Yob
endif
if Ystate >= 3 then
Ystate = 0
else
let Ystate = Ystate + 1
endif
let Yread = Yread - 1
elseif Yread < Yold then
if Ystate = 0 then
high Yob
elseif Ystate = 1 then
high Yoa
elseif Ystate = 2 then
low Yob
elseif Ystate = 3 then
low Yoa
endif
if Ystate <= 0 then
Ystate = 3
else
let Ystate = Ystate - 1
endif
let Yread = Yread + 1
endif
loop until Xread = Xold and Yread = Yold
return

micro

#99
Well done!  
It's a shame that it's too slow right now.

In the beginning I had no 10us pause. But after wiggling the stick like a madman Mario would still walk slowly although the stick was in neutral position again. I guess the n64 controller missed some steps. So I introduced the 10us pause.
Right now it takes 248 cycles to process a step on the x- and the y-axis (including the pause). When running at 8MHz 248 cycles mean 31us. So going from on side to the other (160 steps) takes under 5ms. This is faster than you can move the stick with your thumb so there's no lag.

Are you still running your picaxe with the serial debug cable? You could try to disable debugging because it could slow down your picaxe.

Sharn

Well.. hello again guys. It's been a while, so I'll stop by and tell you what's up. Turns out, my picaxe 18x is just too slow. Picaxe are conservatively 1/50th the speed of a raw PIC at comparable clock speeds, according to one picaxe forum user, so I'm amazed I got it to do much at all. Realistically, if I bought a 20X2, and propped it up at 64Mhz, it would probably be fast enough. I don't want to mess with it though... I have a few AVRs and a programmer on the way in the mail... should be fun. Learning C.. yay! I'll repurpose this picaxe as a clock or something and learn some about AVRs for this application.

I'll be writing in C as bascom is Windows-only, and I am a proud and stingy Linux user. XD

For educational purposes, here is the latest and fastest revision of my code:
#rem
Beta code by Brandon Hartshorn to use a resistance-based joystick
in an OEM Nintendo 64 controller.

Ver0.4
#endrem

setfreq m8
symbol Xjoy = 0
symbol Yjoy = 1
symbol Function = pin2
symbol Xoa = 7
symbol Xob = 6
symbol Yoa = 5
symbol Yob = 4
;add symbols for outputs
symbol Xstate = b0
symbol Ystate = b1
symbol Xold = b2
symbol Yold = b3
symbol Xread = w3
symbol Xsread = b6
symbol Yread = w4
symbol Ysread = b8
symbol Range = b11
symbol Xolder = b12
symbol Yolder = b13

goto setup

main:
do
let Xold = Xolder ;set (soon to be) old values
let Yold = Yolder
gosub curjoy ;read joystick and convert to 0-160
let Xolder = Xsread
let Yolder = Ysread
gosub sendpulses ;send pulses for both axes
;if Function = 1 then: goto togglefunc: endif
loop

setup:
let Range = 18
let Xstate = 2
let Ystate = 2
do
wait 1
gosub curjoy
let Xolder = Xread
let Yolder = Yread
loop until Xolder <> 0 and Yolder <> 0
goto main

togglefunc:
pause 100
if Range = 20 then
let Range = 21
elseif Range = 21 then
let Range = 19
else
let Range = 20
endif
return

curjoy:
readadc10 Xjoy, Xread
readadc10 Yjoy, Yread
let Xsread = Xread * Range / 128
let Ysread = Yread * Range / 128
return

sendpulses:
do while Xsread != Xold or Ysread != Yold
if Xsread > Xold then
Xstate = Xstate + 1 AND 1
if Xstate = 0 then
toggle Xoa
else
toggle Xob
endif
Xsread = Xsread - 1

elseif Xsread < Xold then
Xstate = Xstate + 1 AND 1
if Xstate = 0 then
toggle Xob
else
toggle Xoa
endif
Xsread = Xsread + 1
endif
if Ysread > Yold then
Ystate = Ystate + 1 AND 1
if Ystate = 0 then
toggle Yoa
else
toggle Yob
endif
Ysread = Ysread - 1

elseif Ysread < Yold then
Ystate = Ystate + 1 AND 1
if Ystate = 0 then
toggle Yob
else
toggle Yoa
endif
Ysread = Ysread + 1
endif
loop
return

blaze3927

Sigh i still cannot get this to work. at all.
any chance i Can buy a pre set up/wired attiny24 and ps1/2 analog stick off you micro?


micro

Quote from: Sharn
Picaxe are conservatively 1/50th the speed of a raw PIC at comparable clock speeds
Ouch!  ;D
I'm sure you won't have any speed problems with your AVR. Which AVR did you choose?

@blaze:
I got 1 ATTiny24 left and also a PSX stick, but no top.
Are you still getting "difference" errors when flashing the AVR?

blaze3927

occasionally ill get a difference error, but reprogramming always does the trick, the chips im using atm are the 150mil (lot smaller) version of the attiny24 *shouldnt make a difference) however still no joy with the bigger ones.

if you dont min d parting with your last chip/analog i would be interested in buying it off you, just so  can
1- use it x)
2- compare your circuit/chip to what im doing atm.

on a completely different note, (dont mean to hijack this thread but your the only one i know pf whose good with microchips xD) is it possible to convert this code for attiny13
http://code.google.com/p/modavr/
to work with attiny24?

or are they completely dfferent languages/setups ?

micro

Blaze, as you didn't answer my last message I guess you're not longer interested in buying a microcontroller+stick from me.
I've read on the smashboard forum that you managed to get the attiny to work apparently. So what was the problem? :)

Richter

Hello :), I am new here and I am interested in this, but the PIC that use I cannot find it where I live, it will be that somebody could use the PIC16F876 or in any event the PIC16F877 that are those that if there is with ADC. Thank you :D

public-pervert

yaaaaaaaaaaaaaaaaaaaaaaaaaaaay! this controler mod is pperfect!!  ;D
i used the micro's code for atmega8 and it works perfectly. right now i'm not at home, but will post pictures soon!
i'll use the same mod at my portable too. amazing! thank you guys!  ;D

public-pervert

hey guys! some pictures from my new controller \o/

first i cut the octagonal gate from unoficiall gamecube controller
http://img233.imageshack.us/img233/2189/img0246bw.jpg

the sanded octagonal gate
http://img340.imageshack.us/img340/63/img0247hk.jpg

marked the pot board and cutted an exact circle around the pot. much more simple than the micro's techique to align the pot =)
http://img832.imageshack.us/img832/2235/img0249ex.jpg

and the first view of the work
http://img26.imageshack.us/img26/7867/img0250pv.jpg

http://img408.imageshack.us/img408/1663/img0251v.jpg

and the complete work =D

http://img709.imageshack.us/img709/4728/img0254u.jpg

you can see the atmega at the left hand

http://img130.imageshack.us/img130/1836/img0255vb.jpg

and a lot of wires at the backside xD

http://img200.imageshack.us/img200/3141/img0259ye.jpg



Sharn

That looks pretty amazing, public-pervert. Mine doesn't look half as good, plus it's not working yet. :P The white on clear blue is perfect -thumbs up-

I never got a properly-functioning port of the code working in C for my atmega328p. I know; it's waaaay overkill, but it's what sparkfun had... so anyway, I tried burning an arduino bootloader to my 328 yesterday and suddenly my usbtinyisp programmer won't recognize it. It works fine with the attiny2313, which I got for this project, but they don't have ADC.Go figure. I ordered an arduino board with my $30 sparkfun freeday cash that will hopefully get me up and going....

Oh - I would suggest imgur.com or min.us for pictures. Though imageshack isn't too bad if you link directly to the image.


Richter

Somebody please helps me, I want the code for the pic16f876, it is that there are not those that use.

kylejw

Old hosting site has a policy of deleting web pages after 30 days of inactivity by the owner, and FTP access doesn't count as 'activity'.  In light of this, I'm moving everything to Google Code:

http://code.google.com/p/n64-joystick-translator/

public-pervert

kylejw, will be really great if you make a tutorial on how to do" the analog C stick" on n64 controllers. or micro could try to do some too. :D


public-pervert

can't believe how simple it is. ill try!!  ;D

public-pervert

haaa! i've got it!
the "analog C stick" are working perfectly! ill use at my portable first, and after i'll make on a n64 controler, maybe the same one i did the GC stick mod. thank you, micro!  ;D

kylejw

Mine was a little different, it was essentially two controllers combined into one.  It would workwith Goldeneye, and I'm sure some other games too, which allowed you to control one character using two controllers.  This way, you had one analog for movement and one for looking around.  My dual controller technically has no C buttons.

Fwirt

#118
Hey there, you guys inspired me to finally join the forums...  I've never registered but I've lurked around here grabbing modding ideas for a while now. ;D

Earlier this week I was playing Robotron 64 and noticing how bad my atomic purple's joystick had gotten. I had a spare controller so I swapped joysticks between them, but that still left me with a floppy thumbstick.  I started thinking about those cool Hori pads that everyone talks about, but the price quickly pushed that idea out of my head, so I was thinking about replacing the joystick with something else, but then I ran into the signaling issue... and then about two days later this thread was featured on HackaDay.  It was really weird...

Anyway, a couple days after that I decided to sit down and do the mod.  It took me a while to get the code working, but I'm pretty happy with the results:

Instead of completely getting rid of the restrictor plate as micro and kylejw did, I decided to simply modify the existing one to make sure it matched up nicely with the rest of the controller. At first I tried to dremel out just enough to keep the original octagonal restrictor plate, but the PS2 thumbstick cap wouldn't fit through the hole, so I ended up just turning it into a circle. I picked a PS2 thumbstick because of all the thumbsticks I have laying around, it felt the nicest. Unfortunately, the thumbstick mechanism got glued in about 2mm too far up, so instead of hitting the restrictor, it bottoms out on the mechanism, which has kind of a nasty feeling... If it ever really starts bugging me I guess I can pry out the joystick and re-glue it, but I hope it never comes to that... Anyway, here's a picture of the innards:

In case you start wondering what the extra wires running around the pad are for, I did innovate a little bit...  I figured that since the ATtiny24 that I used (I'm another AVR guy) had a few pins to spare, and the PS2 thumbpad had a built-in tactile switch, I might as well combine them to add turbo functionality.  I dremeled the PCB a bit to isolate the A and B buttons' ground from the rest of the buttons, and then disconnected the trigger ground wires.  I then wired them all up to a microcontroller pin.  The pin is held at ground most of the time, but when the switch (connected to another pin) is activated, the AVR pulses the line about 15 times per second.  The cool thing about this is that unlike most turbo functionality, you don't have to flip a switch or pause the game to activate it, since it's right under your thumb. (Although it's kind of a pain to hold the button and move the joystick at the same time...) I don't even like turbo really, but I guess this means I won't lose at Mario Party anymore. ;) I also wrote the firmware from scratch in C, and can post it if anyone's interested.

Thank you guys for documenting such a cool hack!

public-pervert

great work  ;)
when i decide to do this mod i was think about these buton too, but it's no use, are very hard to make moves with analog and push it at the same time. aswell post the firmware. lets get toguether a lot of knowledge ;)