Page 1 of 1

Joypad type detection?

Posted: Fri Feb 17, 2012 12:54 pm
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?

Re: Joypad type detection?

Posted: Fri Feb 17, 2012 7:07 pm
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?

Posted: Fri Feb 17, 2012 11:56 pm
by oofwill
Ok je vois...

I'll be waiting for next releases 8)

Posted: Sat Feb 18, 2012 6:04 pm
by KanedaFr
Sorry about that...
lot of things happen this year which didn't allow me to finish this...

Posted: Sat Feb 18, 2012 6:16 pm
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.

Posted: Sat Feb 18, 2012 6:20 pm
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 ;)

Posted: Sat Feb 18, 2012 8:48 pm
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.

Posted: Sat Feb 18, 2012 9:50 pm
by oofwill
Thanks, i will test it tomorrow :D

Posted: Sun Feb 19, 2012 3:41 pm
by oofwill
Awesome!

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