Who's Online:

  • [Bot]
Now online:
  • 3 guests
  • 1 robot

 

 

Full XBox 360 Controller Library
Version 1.3
For Dark Basic Professional
And Dark GDK!

 

LICENSE

You are able to download the latest from the download section of this website.

 

 



Games used in:

Ghost Planetoid From Outer Space By: jfroco

 

 

 


 

Known issues:

 

  • Notice to Wireless Controller Users: You may have a wireless controller that can work by itself with the PC, but unable to get connected accessories to work correctly through the wireless controller. After gathering a lot of info about different complaints on the web through google about wireless 360 controllers, most likely I will not be able to do anything about it with my library. The library simply takes info directly from the XInput.dll and gives it to you. There is no special separate XInput functionality and/or parameters for me to use/differentiate between wireless connections and wired connections. That's the XInput DLL's job because all we want is the data/info it gives us. Wired + Accessories works 100%, but wireless + Accessories don't? There's no special XInput option for me to enable for that. It doesn't work like that.
  • Note: The "Guide" Button on the gamepad for example is for Microsoft use only. I am not able to supply a function for it's use as there is no XInput functionality for me to code it.


Some problems found from the web about wireless controllers:

  • old firmware on older generation controllers will not work for the PC period.
  • people try to use the charger adapter usb cable to connect the wireless controller directly to the PC like a wired controller. People say they got it to work that way, but I would be scared about frying something like that. I don't recommend that at all.
  • Apparently there are two flavors of the 360 gamepad. It will say on the it's packaged box, made for PC ( or Windows ) or made for XBox360. I never seen anything like that and wouldn't have any clue how you can tell which one you have.
  • There's also talk about problems with the wireless controller wanting to much power through the usb receiver that the controller itself may or may not work. If that's true, I can understand why connected accessories don't work. Needs more juice! If your headset is not working with your wireless gamepad, this is probably the reason.
  •  This wireless 360 receiver for the PC thing seems to not be in production anymore. Major stores around here don't carry it and these stores are even out of stock to order them online. Wonder why?


Just in case, this is the direct instructions on how to connect a wireless controller with the PC receiver:
X12-35608-01_NA_EN_FR_ES.pdf

This is where I'm getting all these wireless issues from at google:
wireless 360 gamepad PC
 



 

 

[ Network Question ]
Will network programming guru's out there be able to take the current sound data and send it over the network to another user and be able to hear the voice sound data good enough? Like with XBox Live? For me, the sound data sounds good enough when played into my XBox 360 headset. If you try, please let me know how it goes. Thanks


  • You can use any XBox360 controllers like the gamepad and the guitar that have drivers made for them for the PC!
  • Download is in rar format. Don't have a utility to unrar rar files? Search google for Winrar!


   


Included example program showing the values returned from the XBox360 controller:


Screenshot of example program included with library

 

 

 

DBPRO:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
GENERAL FUNCTIONS
 
XB360 INIT
XB360 POLL(Integer MODE 0-3)
XB360 CHECK CONTROLLER CONNECTIONS
XB360 CHECK HEADSET CONNECTIONS
XB360 CONTROLLER CONNECTED (Integer 0-3),Returns:Boolean
XB360 HEADSET CONNECTED (Integer 0-3),Returns:Boolean
XB360 CONTROLLER TYPE (Integer 0-3),Returns:Integer
XB360 VOICE SUPPORTED (Integer 0-3),Returns:Boolean
XB360 GET BATTERY LEVEL (Integer 0-3, Integer BatteryDeviceType),Returns:Integer
 
BUTTON FUNCTIONS
 
XB360 A BUTTON (Integer 0-3),Returns:Boolean
XB360 B BUTTON (Integer 0-3),Returns:Boolean
XB360 X BUTTON (Integer 0-3),Returns:Boolean
XB360 Y BUTTON (Integer 0-3),Returns:Boolean
XB360 BACK BUTTON (Integer 0-3),Returns:Boolean
XB360 START BUTTON (Integer 0-3),Returns:Boolean
XB360 DPAD (Integer 0-3),Returns:DWORD
XB360 LEFT SHOULDER (Integer 0-3),Returns:Boolean
XB360 RIGHT SHOULDER (Integer 0-3),Returns:Boolean
XB360 LEFT THUMB (Integer 0-3),Returns:Boolean
XB360 RIGHT THUMB (Integer 0-3),Returns:Boolean
 
ANALOG FUNCTIONS
 
XB360 LEFT TRIGGER (Integer 0-3),Returns: Analog Value 0-255
XB360 RIGHT TRIGGER (Integer 0-3),Returns: Analog Value 0-255
XB360 THUMB LEFT X (Integer 0-3),Returns: Analog Value -32768 to 32767
XB360 THUMB LEFT Y (Integer 0-3),Returns: Analog Value -32768 to 32767
XB360 THUMB RIGHT X (Integer 0-3),Returns: Analog Value -32768 to 32767
XB360 THUMB RIGHT Y (Integer 0-3),Returns: Analog Value -32768 to 32767
XB360 THUMB DEAD ZONE ENABLE (Integer 0-3, Boolean 0-1)
XB360 THUMB DEAD ZONE PERCENT (Integer 0-3, Integer 0-100)
XB360 TRIGGER DEAD ZONE ENABLE (Integer 0-3, Boolean 0-1)
XB360 TRIGGER DEAD ZONE PERCENT (Integer 0-3, Integer 0-100)
 
RUMBLE FUNCTIONS
 
XB360 LEFT MOTOR SPEED (Integer 0-3, Integer 0-65535)
XB360 RIGHT MOTOR SPEED (Integer 0-3, Integer 0-65535)
 
AUDIO FUNCTIONS
 
XB360 START AUDIO
XB360 STOP AUDIO
XB360 CHECK NEW SOUND DATA (Integer 0-3),Returns:Boolean
XB360 GET SOUND DATA MEMBLOCK ID (Integer 0-3),Returns:Integer
XB360 PLAY AUDIO (Integer 0-3, Integer MemblockID)
 
KEYSTROKE FUNCTIONS
 
XB360 KEYSTROKE ON
XB360 KEYSTROKE OFF
XB360 GET KEYSTROKE FLAGS(Integer 0-3),Returns:DWORD
XB360 GET KEYSTROKE HID CODE(Integer 0-3),Returns:DWORD
XB360 GET KEYSTROKE VIRTUAL KEY(Integer 0-3),Returns:DWORD
XB360 GET KEYSTROKE STATUS(Integer 0-3),Returns:DWORD
 
 

 

DARKGDK/C++:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
GENERAL FUNCTIONS
 
void XB360Init()
void XB360Poll(int MODE)
void XB360CheckControllerConnections()
void XB360CheckHeadsetConnections()
int XB360ControllerConnected(int index)
int XB360HeadsetConnected(int index)
int XB360ControllerType(int index)
int XB360VoiceSupported(int index)
int XB360GetBatteryLevel(int index, int BatteryDeviceType)
void XB360Exit()
 
BUTTON FUNCTIONS
 
int XB360AButton(int index)
int XB360BButton(int index)
int XB360XButton(int index)
int XB360YButton(int index)
int XB360BackButton(int index)
int XB360StartButton(int index)
DWORD XB360DPAD(int index)
int XB360LeftShoulder(int index)
int XB360RightShoulder(int index)
int XB360LeftThumb(int index)
int XB360RightThumb(int index)
 
ANALOG FUNCTIONS
 
int XB360LeftTrigger(int index)
int XB360RightTrigger(int index)
int XB360ThumbLeftX(int index)
int XB360ThumbLeftY(int index)
int XB360ThumbRightX(int index)
int XB360ThumbRightY(int index)
void XB360ThumbDeadZoneEnable(int index, int enable)
void XB360ThumbDeadZonePercent(int index, int percent)
void XB360TriggerDeadZoneEnable(int index, int enable)
void XB360TriggerDeadZonePercent(int index, int percent)
 
RUMBLE FUNCTIONS
 
void XB360LeftMotorSpeed(int index, int speed)
void XB360RightMotorSpeed(int index, int speed)
 
AUDIO FUNCTIONS
 
void XB360StartAudio()
void XB360StopAudio()
int XB360CheckNewSoundData(int index)
int XB360GetSoundDataMemblockID(int index)
void XB360PlayAudio(int index, int SoundDataMemblockID)
 
KEYSTROKE FUNCTIONS
 
void XB360KeystrokeOn()
void XB360KeystrokeOff()
DWORD XB360GetKeystrokeFlags(int index)
DWORD XB360GetKeystrokeHidCode(int index)
DWORD XB360GetKeystrokeVirtualKey(int index)
XB360GetKeystrokeStatus(int index)