* Login 
* FAQ    * Search

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: N64 controller joystick encoding
PostPosted: Tue Aug 21, 2012 8:30 pm 
Offline

Joined: Tue Aug 21, 2012 8:14 pm
Posts: 2
I am working on building a N64 to USB adapter using a PIC24FJ64GB002 microcontroller. Right now I've got everything working except the Analog joystick doesn't work as expected. Could someone please tell me how it actually does the encoding? (i.e. does the controller return the difference in position from the last time it was polled or does it actually return the current joystick position?)

Also, is the scale from 127 to -128 on the x and y axis or is it 0 to 255?

Thanks,

-Dan

P.S. I know that you can buy adapters like what I'm trying to build but this seemed like a fun way to learn to create USB HIDs


Top
 Profile E-mail  
 
 Post subject: Re: N64 controller joystick encoding
PostPosted: Wed Aug 22, 2012 11:36 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 18, 2008 7:15 pm
Posts: 1559
Location: Southern CT
This would probably be useful:

http://www.instructables.com/id/Use-an- ... ontroller/

_________________
GET FREE WOW GOLD SEX VISIT MODRETRO



Top
 Profile E-mail  
 
 Post subject: Re: N64 controller joystick encoding
PostPosted: Sun Aug 26, 2012 7:19 pm 
Offline
Portablizer
User avatar

Joined: Tue Mar 25, 2008 2:11 am
Posts: 423
Location: Newcastle, Australia
The joystick output is represented as 2s complement which does range from -128 to 127. However the actual range of any N64 joystick is much less. Using a range of -80 to 80 seems to be the best fit to a number of controllers. It's not an artifact of bad joysticks, game's are programmed to expect input within these bounds and you'll get many amusing joystick problems if you have a larger range.


Top
 Profile  
 
 Post subject: Re: N64 controller joystick encoding
PostPosted: Mon Aug 27, 2012 1:13 pm 
Offline

Joined: Tue Aug 21, 2012 8:14 pm
Posts: 2
Thanks for the help. I finally got it all working (I had the bit order reversed for the joystick).

-Dan


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group