Joypad type detection?

SGDK only sub forum

Moderator: Stef

Post Reply
oofwill
Very interested
Posts: 174
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Joypad type detection?

Post by oofwill »

Hum, i'm reading the wiki SGDK tutorial (http://code.google.com/p/sgdk/source/br ... .wiki?r=14)
`JOY_getJoyID` gives you ever more information about the current joypad.

Actually, SGDK is able to give you the ID of
* 3 buttons joypad (ID & *JOY_SUPPORT_3BTN*)
* 6 buttons joypad (ID & *JOY_SUPPORT_6BTN*)
* Sega !TeamPlayer (ID & *JOY_SUPPORT_TEAMPLAY*)
* EA 4Way or !TeamPlayer in Extra mode (ID & *JOY_SUPPORT_EA4WAY*)
* Sega Mouse (ID & *JOY_SUPPORT_MOUSE*)
* Konami Justifier (ID & *JOY_SUPPORT_JUSTIFIER*)
Sadly, i'm not able to use 'JOY_getJoyID` since this function dont seems to be included in SGDK.

Is it an old function not used anymore or what?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Joypad type detection?

Post by Stef »

Unfortunately this function is *not yet* implemented, you are watching wiki source and this part is commented as not yet done ;)
The next version will include more support about joypad, right now only 3 buttons joypad are supported...
oofwill wrote:Hum, i'm reading the wiki SGDK tutorial (http://code.google.com/p/sgdk/source/br ... .wiki?r=14)
`JOY_getJoyID` gives you ever more information about the current joypad.

Actually, SGDK is able to give you the ID of
* 3 buttons joypad (ID & *JOY_SUPPORT_3BTN*)
* 6 buttons joypad (ID & *JOY_SUPPORT_6BTN*)
* Sega !TeamPlayer (ID & *JOY_SUPPORT_TEAMPLAY*)
* EA 4Way or !TeamPlayer in Extra mode (ID & *JOY_SUPPORT_EA4WAY*)
* Sega Mouse (ID & *JOY_SUPPORT_MOUSE*)
* Konami Justifier (ID & *JOY_SUPPORT_JUSTIFIER*)
Sadly, i'm not able to use 'JOY_getJoyID` since this function dont seems to be included in SGDK.

Is it an old function not used anymore or what?
oofwill
Very interested
Posts: 174
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill »

Ok je vois...

I'll be waiting for next releases 8)
KanedaFr
Administrateur
Posts: 1154
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr »

Sorry about that...
lot of things happen this year which didn't allow me to finish this...
Chilly Willy
Very interested
Posts: 2993
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy »

I've already posted some code for using a mouse, 3 button, and 6 button pad to the board. You may want to use that until the official support is done.
oofwill
Very interested
Posts: 174
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill »

No problem ;)

I've made a program to detect the megadrive config (usefull when i just mod a megadrive and don't know the switch position)

I wanted to detect what type of joypad was connected, just for fun, so don't work hard for this, it was just for training for me ;)
Chilly Willy
Very interested
Posts: 2993
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy »

If you wanted to look at my changes for 3/6/mouse, they're here.

That will change a little as it gets added to the repo... the mouse counters will become separate functions, for example.
oofwill
Very interested
Posts: 174
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill »

Thanks, i will test it tomorrow :D
oofwill
Very interested
Posts: 174
Joined: Mon May 03, 2010 6:12 pm
Location: France - Niort

Post by oofwill »

Awesome!

It's exactly what i was expecting!
My demo is now finished for my needs, many thanks again :)
Post Reply