Balance Board frustration

Official forum for open source FreePIE discussion and development.
Post Reply
Jabberwock
Cross Eyed!
Posts: 196
Joined: Mon Mar 02, 2015 3:58 pm

Balance Board frustration

Post by Jabberwock »

Any advice is welcome...

I have bought Wii Balance Board mostly for playing one game - Kelly Slater's Pro Surfer. I have been pretty confident I will be able to make it work... I was wrong. I planned to integrate the board input into one virtual controller (with Game Trak or a gamepad to support the buttons). I knew FreePIE does not handle the board, so I wanted to use BalanceWalker to emulate a Headsoft Virtual Joystick, which would be read by FreePIE and sent to vJoy Device together with other input. This failed miserably for several reasons:

1. Headsoft vJoy and FreePIE's vJoy do not work at the same time.
2. None of the vJoys work with the game - it seems to accept only gamepad input, no other controller works. I have tried the very old PrivateProperties/OEMData trick, but this does not work either.
3. The game does not accept emulated keyboard input (e.g. from BalanceWalker), only physical ones.

I am quite frustrated as I cannot use my new toy... Well, I can play Snow, but it is not the same (it is much colder).
MarijnS95
One Eyed Hopeful
Posts: 34
Joined: Tue Dec 22, 2015 12:52 pm

Re: Balance Board frustration

Post by MarijnS95 »

I hope I can help out here, even though I do not have any experience with this controller/game. See this as educated tips/ideas ;)

So, if I understand correctly, Headsoft's vJoy emulates a regular DirectInput device which can be read-out through the joystick class in FreePIE, correct?
Then, if the game supports the Xbox 360 controller (I haven't been able to verify this :() it's fairly easy to solve.

FreePIE doesn't have out-of-the-box support for emulating xbox controllers, but luckily I wrote such a thing a couple weeks ago (and shortly thereafter found out someone else did the same thing 11 months ago :o). You need to install the SCP driver, then just use FreePIE's IntelliSense/autocomplete to figure out the member names, using it is pretty straightforward: scp[0].leftTrigger = joystick[0].x // 257, for instance.

In case you're unable to clone and build from the repo, you can download the dll here. Just put it in the plugins folder inside the FreePIE installation directory.

Good luck :)
Jabberwock
Cross Eyed!
Posts: 196
Joined: Mon Mar 02, 2015 3:58 pm

Re: Balance Board frustration

Post by Jabberwock »

It seems promising... first of all, the game sees the XBOX controller as a joystick - yay!

Now I was trying to write a script for it and I cannot say I have succeeded... A simple script such as:

scp[0].leftx = 1

did not seem to make any difference (I have tried various values). I have tried to toggle buttons, but I cannot figure out how ScpButtonMask works...

On the other hand, xoutput seems to be working well. I have to put off the tests before I can get Headsoft's vJoy to work (I cannot restart the system right now). This is one minor inconvenience: if it works, I will need to manually reinstall each vJoy depending on whether I want the board or other scripts using freeware vJoy. Still I think it is worth it.

Of course, if you feel like writing a Balance Board plugin for FreePIE, I would be very willing to test it out :D
MarijnS95
One Eyed Hopeful
Posts: 34
Joined: Tue Dec 22, 2015 12:52 pm

Re: Balance Board frustration

Post by MarijnS95 »

My scp plugin uses the same value range as xoutput: the sticks range from -2**15 to 2**15-1, and the triggers from 0 to 255. (Which is how it works in the xbox controller.)

The ScpButtonMask is actually a 'wrong' name that accidentally ended up there. But you can use it like this:

Code: Select all

scp[0].SetButton(ScpButtonMask.A, True) # Sets the button determined by ScpButtonMask (in this case A) to the boolean value True (pressed)
I'm definitely not going to write a balance board plugin, as that's gonna be the same drama as with FFB: it's way too interesting but I'm unable to test it locally making it completely impossible to debug :D. There's no advantage in it for me but I still spend all that time which could've been used elsewhere.
Jabberwock
Cross Eyed!
Posts: 196
Joined: Mon Mar 02, 2015 3:58 pm

Re: Balance Board frustration

Post by Jabberwock »

I have figured out the ranges since. But thanks for the syntax for your plugin!

Too bad about the BB plugin, but you understand I had to ask :) As I could not make the other vJoy to work anymore, I have installed Wii HID controller drivers. They seemed to wreak havoc on my system and require to run it without driver signing (yikes!), but hey, it was worth it - I had already surfed a bit in Kelly Slater. Well, mostly I have fallen off the board, as I cannot get used to it (the game has third person "seen from the front" view), but I will master it some day... Thanks for the help!
Post Reply

Return to “FreePIE”