Could this support Xbox Big Button Controllers?

Official forum for open source FreePIE discussion and development.
Post Reply
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Could this support Xbox Big Button Controllers?

Post by xhonzi »

Probably not the best site for this question- but heaven knows I've asked it everywhere else.

The Xbox 360 Big Button controllers (SceneIt Controllers) don't have Windows drivers. For some reason, the generic Windows driver that works for almost all other Xbox 360 controllers, but not the big button controller.

I looked into GlovePie, but didn't get very far.

I'm guessing I would still need some kind of driver to use FreePie. Is that right?

There's a custom linux driver out there in the wild... I've talked to one of its developers, but so far I've had no luck getting it to work in Windows.

Sorry for crashing the party- I know it's not really 3D or VR related.
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: Could this support Xbox Big Button Controllers?

Post by brantlew »

Well yes, first it would need some type of driver interface - whether that's a serial port or some other custom I/O, I have no idea. Once an I/O interface is established, then it would be easy to pull those signals into FreePIE and map it to other control commands. But a basic Windows interface would need to be worked out.
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

https://github.com/micolous/xbox360bb

Here's the linux driver. It has some low level stuff in it that a non-HW guy like me doesn't read.

Would this be enough information for a smartie like you to go from, or is it still incomplete?
User avatar
brantlew
Petrif-Eyed
Posts: 2221
Joined: Sat Sep 17, 2011 9:23 pm
Location: Menlo Park, CA

Re: Could this support Xbox Big Button Controllers?

Post by brantlew »

I amd sure that given a Linux driver, a Windows port could be written. But at the moment, I have several other projects that I am working on. So unfortunately this is not something that I could work on very soon. But FreePIE is open source, so anyone is free to add in this capability.
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

I thought all of the hard work would have been done to write the Linux driver... but the author mentioned to me that he had tried and failed to make it work under windows... so I don't know what hope I have.

Still, we discussed some options like USB sharing under a VMWare'd Linux or libusb.

Thanks for the feedback. Someday I will get these controllers running under Windows and then I will rule the world!
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

I'm back!

The solution I went with was to use LibUSB's generic USB driver which gave me read access to the USB endpoint where my data was. I wrote a .dll in C# that exposes an object that looks a lot like MS's Xbox360Controller object, as used in .NET or XNA.

Which is all I really wanted in the first place. So I'm pretty happy with that.

However, there has been some interest in just using the BBC as a default Windows Gamepad... and LibUSB doesn't seem to be helpful there. I'm thinking that now I have an endpoint, through the LibUSB driver, that there should be a way to use PPJoy or FreePie to emulate a Windows HID controller and feed the values from the BBC into the 4 virtual game pads.

How hard is it going to be to get FreePie to read the LibUSB provided endpoint?

My code thus far is here, if anyone is interested: http://sourceforge.net/projects/xna-bigbutton/files/
The code we'd be adapting into FreePIEthon is this one: BigButtonDriver.cs, which should be easy once the importing of the LibUSB libraries is done.
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Could this support Xbox Big Button Controllers?

Post by CyberVillain »

https://github.com/AndersMalmgren/FreeP ... evelopment

There's the guide, its very easy, just reference FreePIE.Core.Contracts dll and implement IPlugin

Nice work with the big button :)
Last edited by CyberVillain on Mon Mar 11, 2013 3:42 pm, edited 1 time in total.
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

Awesome, I'll take a look.
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

Alright... I've been taking a look... maybe I'm just too tired but I need a little help to get started.

Here's the 10,000 ft view of the code from my .Net version: (full version for the curious at link a couple posts up)

Code: Select all

using System;
using System.Text;
using LibUsbDotNet;
using LibUsbDotNet.Main;
using System.Diagnostics;

namespace BigButtonControllerDriver
{
    public class BigButtonControllers
    {
        /// <summary>
        /// Struct containing buttons for each of the Big Button Controllers.        
        /// </summary>
        public struct bbcButtons
        {
            public BButtonState Xbox;
            public BButtonState BigButton;
            public BButtonState A;
            public BButtonState B;
            public BButtonState X;
            public BButtonState Y;
            public BButtonState Start;
            public BButtonState Back;
        }

        /// <summary>
        /// Struct containing a Player controller and its button states.
        /// </summary>
        public struct bbcPlayer
        {
            //int id;
            public bbcButtons Buttons;
            public bbcDPad DPad;
            public bbcThumbSticks ThumbSticks;
            public int lastState3;
            public int lastState4;
            public bool AnyButtonsPressed;// = false;
        }

        /// <summary>
        /// Struct containing the 4 Players and all of their button states.        
        /// </summary>         
        public struct BbcState
        {
            public bbcPlayer Player1;// = new bbcState();//(.id = 1);
            public bbcPlayer Player2;// = new bbcState();//(.id = 2);
            public bbcPlayer Player3;// = new bbcState();
            public bbcPlayer Player4;// = new bbcState();
            /// <summary>
            /// This bool is true when no buttons are pressed by any players
            /// </summary>
            public bool AnyButtonsPressed;// = false;
        }

        //Class level vars
        static UsbDevice MyUsbDevice;
        BbcState bbcState;
        ErrorCode ec;
        long p1lastPoll; //these aren't part of the player object so they don't get set back to 0 when the player is emptied
        long p2lastPoll; 
        long p3lastPoll; 
        long p4lastPoll; 

        #region SET YOUR USB Vendor and Product ID!

        static UsbDeviceFinder MyUsbFinder = new UsbDeviceFinder(0x045e, 0x02a0);  //0x045e is Xbox Controllers, 0x02a0 is the BBC

        #endregion

        /// <summary>
        /// Method to determine the state of the Start, Back, and DPad buttons.
        /// Returns a bbcPlayer object.
        /// </summary>
        bbcPlayer processByte3(byte byte3, bbcPlayer player)
        {
            <snip boring code that does exactly what you'd think>
            return player;
        }

        /// <summary>
        /// Method to determine the state of the A, B, X, Y, BigButton, and Xbox Guide Buttons.
        /// Returns a bbcPlayer object.
        /// </summary>
        bbcPlayer processByte4(byte byte4, bbcPlayer player)
        {
           <snip more heavy lifting>
            return player;
        }

        byte[] readBuffer = new byte[5];
        UsbEndpointReader reader;
        bbcPlayer emptyPlayer;// = new bbcPlayer();        

        //Connection code
        /// <summary>
        /// Connects the low level USB stuff so the states can be read.  Slow.
        /// </summary>
        void bbcconnect()
        {
            <snip LibUsb Connectivity code.  Basically run it once and don't disconnect until the end>
        }
        /// <summary>
        /// Disconnects the low level USB stuff.  Call during UnloadContent().
        /// </summary>
        public void UnloadBbcUsb()
        {
             <snip LibUsb disconnect stuff>
        }


        /// <summary>
        /// Populates a BbcState object with the state of each of the 4
        /// players and all of their buttons.
        /// </summary>
        public BbcState GetState()
        { 
            <not snipped... but you don't have to read it.  It's the main public method that calls all others>  
            ec = ErrorCode.None;

            if (MyUsbDevice == null)
                this.bbcconnect();

            long now = DateTime.Now.Ticks;
            bbcState.Player1 = (now - p1lastPoll < 1500000) ? bbcState.Player1 : emptyPlayer;
            bbcState.Player2 = (now - p2lastPoll < 1500000) ? bbcState.Player2 : emptyPlayer;
            bbcState.Player3 = (now - p3lastPoll < 1500000) ? bbcState.Player3 : emptyPlayer;
            bbcState.Player4 = (now - p4lastPoll < 1500000) ? bbcState.Player4 : emptyPlayer;

            if (bbcState.Player1.AnyButtonsPressed == false && bbcState.Player2.AnyButtonsPressed == false && bbcState.Player3.AnyButtonsPressed == false && bbcState.Player4.AnyButtonsPressed == false)
                bbcState.AnyButtonsPressed = false;

            while (ec == ErrorCode.None)
            {

                int bytesRead = 0;
                bbcPlayer player;

                // If the device hasn't sent data in the specified timeout milliseconds,
                // a timeout error (ec = IoTimedOut) will occur. 
                readBuffer = new byte[10];  //zero it out since the last good state will not be overwritten if there are 0 bytes
                //null reference- needs try catch block
                try
                {
				  ec = reader.Read(readBuffer, 5, out bytesRead);
                }
				catch
				{
				  //couldn't read from the endpoint, probably no controller
				}
                if (bytesRead > 0)
                {
                    if (readBuffer[2] == 0)         //determine player based on byte #2
                    {
                        p1lastPoll = now;             //tell the clock that we updated at this time                            
                        player = bbcState.Player1;                        
                    }
                    else if (readBuffer[2] == 1)
                    {
                        p2lastPoll = now;
                        player = bbcState.Player2;                        
                    }
                    else if (readBuffer[2] == 2)
                    {
                        p3lastPoll = now;
                        player = bbcState.Player3;                       
                    }
                    else //(readBuffer[2] == 3)
                    {
                        p4lastPoll = now;
                        player = bbcState.Player4;
                    }
                    player.AnyButtonsPressed = true;
                    bbcState.AnyButtonsPressed = true;
                    if (readBuffer[3] != player.lastState3 || readBuffer[4] != player.lastState4)// || pcount == 1)
                    {
                        player = processByte3(readBuffer[3], player);
                        player = processByte4(readBuffer[4], player);
                        player.lastState3 = readBuffer[3];
                        player.lastState4 = readBuffer[4];
                        //Console.WriteLine(pcount + " " + readBuffer[2].ToString() + " " + readBuffer[3].ToString() + " " + readBuffer[4].ToString() + " A: " + player.Buttons.A.ToString() + "  B: " + player.Buttons.B.ToString() + "  X: " + player.Buttons.X.ToString() + "  Y: " + player.Buttons.Y.ToString());                             
                    }
                    //set the anonymous player settings back to the parent class
                    if (readBuffer[2] == 0)
                        bbcState.Player1 = player;
                    else if (readBuffer[2] == 1)
                        bbcState.Player2 = player;
                    else if (readBuffer[2] == 2)
                        bbcState.Player3 = player;
                    else //(readBuffer[2] == 3)
                        bbcState.Player4 = player;
                    if (bbcState.Player1.Buttons.A == BButtonState.Pressed && bbcState.Player2.Buttons.A == BButtonState.Pressed && bbcState.Player3.Buttons.A == BButtonState.Pressed && bbcState.Player4.Buttons.A == BButtonState.Pressed)
                    {
                        //int count = -1;  //you win!
                    }
                }
            }//end of while no timeout                        
            return bbcState;
        }
    }
So... basically I have some class level structs and vars... I have some LibUsb connect/disconnect code... and I have the code that runs each frame to get the latest byte from the USB and then assign the values to the 4 controller objects inside the main object.

Here are my questions:
1. I am assuming I need to take this .NET code and moderately modify it for FreePIE use. Could I actually just call my existing .dll from a FreePIE plugin and call it a day?
2. Am I going to have trouble using the LibUsb libraries inside of a FreePIE plugin?
3. Can someone experienced with FreePIE look at my methods and help me figure out what to put where? I'm thinking I should be able to figure that out... but the FreePIE stuff intimidates me for some reason.
4. Are there publicly available Plugin examples? I didn't find anything besides the plugin development page at github.
Baristan6
Cross Eyed!
Posts: 111
Joined: Sat Dec 15, 2012 11:33 am

Re: Could this support Xbox Big Button Controllers?

Post by Baristan6 »

Here is a plugin that you can use as an example.
https://github.com/Baristan6/VireioSMT
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Could this support Xbox Big Button Controllers?

Post by CyberVillain »

Its very, very little code thats needed to make a plugin.

Reference FreePIE.Core.Contracts.dll from your Plugin class library

Implement FreePIE.Core.Contracts.IPlugin and mark it with the GlobalType flag

You can reference your dll from your Plugin class library and use that in the plugin code

CreateGlobal should return a object that has the methods and properties you want to access from the script, the global class must be marked with the Global flag
Start should setup and initiate your plugin, if you need to run in a seperate thread from the script engine return a Action from this method the action will be executed in its own thread.

Thats all needed for a basic plugin, more info here https://github.com/AndersMalmgren/FreeP ... evelopment

edit: btw, see the end of above doc on how to debug your plugin "Debug external Plugin"
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

I'll give it another shot, thanks.
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

I had a couple of general "how to develop a plugin" questions that I put in the "External Plugin" thread.

Here's something a bit more specific.

This is my plugin. It's short. (I added/changed 11 lines on the template.)

Code: Select all

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FreePIE.Core.Contracts;     //new
using BigButtonControllerDriver;  //new

namespace FreePie_BBC             //new
{
    [GlobalType(Type = typeof(MyPluginGlobal))]
    public class MyPlugin : IPlugin
    {
        BigButtonControllers bbc = new BigButtonControllers();     //new
        public BigButtonControllers.BbcState bbstate;                   //new
        public object CreateGlobal()
        {
            return new MyPluginGlobal(this);
        }

        public Action Start()
        {
            bbstate = bbc.GetState();                     //new
            //This method is called just before script starts, here you can do your start up stuff
            return null;
        }

        public void Stop()
        {
            bbc.UnloadBbcUsb();         
        }

        public event EventHandler Started;

        public string FriendlyName
        {
            get { return "Xbox_BBC"; }      //new
        }

        public bool GetProperty(int index, IPluginProperty property)
        {
            return false;
        }

        public bool SetProperties(Dictionary<string, object> properties)
        {
            return false;
        }

        public void DoBeforeNextExecute()
        {
            //This method will be executed each iteration of the script
            bbstate = bbc.GetState();            //new
        }
    }

    [Global(Name = "xbox_BBC")]             //new
    public class MyPluginGlobal
    {
        private readonly MyPlugin myPlugin;

        public MyPluginGlobal(MyPlugin myPlugin)
        {
            this.myPlugin = myPlugin;
        }

        public BigButtonControllers.BbcState bbstate     //new
        {
            get { return myPlugin.bbstate; }                  //new
        }
    }
}
The .dll I previously wrote should be doing all of the heavy lifting, right? It exposes an object called bbstate, which has 4 controller objects in it, which have all of the button, d-pad states. So my script would potentially look like this:

Code: Select all

if xbox_bbc.bbstate.Player1.Buttons.A == BButtonState.Pressed:
       keyboard.setkey(key.1, 1)
if xbox_bbc.bbstate.Player1.Buttons.B == BButtonState.Pressed:
       keyboard.setkey(key.Q, 1)
if xbox_bbc.bbstate.Player1.Buttons.X == BButtonState.Pressed:
       keyboard.setkey(key.A, 1)
if xbox_bbc.bbstate.Player1.Buttons.Y == BButtonState.Pressed:
       keyboard.setkey(key.Z, 1)
if xbox_bbc.bbstate.Player2.Buttons.A == BButtonState.Pressed:
       keyboard.setkey(key.2, 1)
if xbox_bbc.bbstate.Player2.Buttons.B == BButtonState.Pressed:
       keyboard.setkey(key.W, 1)
if xbox_bbc.bbstate.Player2.Buttons.X == BButtonState.Pressed:
       keyboard.setkey(key.S, 1)

Etc...
Is it that simple? If I could get my plugin to work, would I be close to done?
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

Alright, after rewriting more of the Plugin than I wanted to- I have it working which is the only important thing right now.

The goal is to map the Big Button Controller buttons (some of them) to keyboard controls so that they can be used in a C# Jeopardy game I am writing.

Next, I'd like to figure out how to make them appear to the OS as four gamepads. Would that be through PPJoy? Or best to emulate the xbox gamepad?

Code: Select all

keyboard.setKey(Key.D1, xbox_BBC.getButton(1, "A"))
keyboard.setKey(Key.Q, xbox_BBC.getButton(1, "B"))
keyboard.setKey(Key.A, xbox_BBC.getButton(1, "X"))
keyboard.setKey(Key.Z, xbox_BBC.getButton(1, "Y"))
keyboard.setKey(Key.F1, xbox_BBC.getButton(1, "BB"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(1, "Up"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(1, "Down"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(1, "Left"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(1, "Right"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(1, "Start"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(1, "Back"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(1, "Xbox"))
keyboard.setKey(Key.D2, xbox_BBC.getButton(2, "A"))
keyboard.setKey(Key.W, xbox_BBC.getButton(2, "B"))
keyboard.setKey(Key.S, xbox_BBC.getButton(2, "X"))
keyboard.setKey(Key.X, xbox_BBC.getButton(2, "Y"))
keyboard.setKey(Key.F2, xbox_BBC.getButton(2, "BB"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(2, "Up"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(2, "Down"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(2, "Left"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(2, "Right"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(2, "Start"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(2, "Back"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(2, "Xbox"))
keyboard.setKey(Key.D3, xbox_BBC.getButton(3, "A"))
keyboard.setKey(Key.E, xbox_BBC.getButton(3, "B"))
keyboard.setKey(Key.D, xbox_BBC.getButton(3, "X"))
keyboard.setKey(Key.C, xbox_BBC.getButton(3, "Y"))
keyboard.setKey(Key.F3, xbox_BBC.getButton(3, "BB"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(3, "Up"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(3, "Down"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(3, "Left"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(3, "Right"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(3, "Start"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(3, "Back"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(3, "Xbox"))
keyboard.setKey(Key.D4, xbox_BBC.getButton(4, "A"))
keyboard.setKey(Key.R, xbox_BBC.getButton(4, "B"))
keyboard.setKey(Key.F, xbox_BBC.getButton(4, "X"))
keyboard.setKey(Key.V, xbox_BBC.getButton(4, "Y"))
keyboard.setKey(Key.F4, xbox_BBC.getButton(4, "BB"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(4, "Up"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(4, "Down"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(4, "Left"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(4, "Right"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(4, "Start"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(4, "Back"))
#keyboard.setKey(Key.D1, xbox_BBC.getButton(4, "Xbox"))
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Could this support Xbox Big Button Controllers?

Post by CyberVillain »

The Xbox plugin is read only, you need to use ppJoy for emulation.
See the external plugin thread for your other questions
target39
One Eyed Hopeful
Posts: 2
Joined: Thu Mar 20, 2014 5:53 pm

Re: Could this support Xbox Big Button Controllers?

Post by target39 »

xhonzi wrote:Alright, after rewriting more of the Plugin than I wanted to- I have it working which is the only important thing right now.

The goal is to map the Big Button Controller buttons (some of them) to keyboard controls so that they can be used in a C# Jeopardy game I am writing.

Next, I'd like to figure out how to make them appear to the OS as four gamepads. Would that be through PPJoy? Or best to emulate the xbox gamepad?
I know this thread hasn't been active for over 9 months, but I need some help. I've downloaded Trivia Host and the Big Button drivers from your sourceforge links and it works great.

I was wondering if you were able to finish your Jeopardy game. Trivia Host is great, except for one bug/exploit I've found. In the waiting mode (default start mode, or F2/F3), if a controller(s) holds a button down in the "Waiting for next question..." stage, and then space is pressed while the button is still held, the program will think that this controller was the first one to submit an answer, even though it was pressed before the "Answer Now!" stage. If two or more controllers use this exploit, the program orders it by player number order (first to last: Green, Red, Blue, Yellow). This exploit also works in FirstToAnswer mode (F4).

Finally, it would be great if I was given the ability to change the window size (I can resize it with third part software, but it doesn't scale very well), font style, size, color, and text displayed without having to use something like .NET Reflector. For now, I'll use PowerPoint to display the questions, and Trivia Host to see answers, but if you have already written a better program, I'd love to try it.
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

Hey there- I just stumbled back into this sub-forum and was surprised to see this thread had been bumped.

I'm relieved to see that you were able to make it work, so that's good news.

The Jeopardy thing works pretty well. I'll have to dig it out in the next few days and make sure it's shareable, and if it is I will put it up on the sourceforge.

Thanks for checking in! It feels very lonely in the BigButton camp sometimes.
target39
One Eyed Hopeful
Posts: 2
Joined: Thu Mar 20, 2014 5:53 pm

Re: Could this support Xbox Big Button Controllers?

Post by target39 »

xhonzi wrote:Hey there- I just stumbled back into this sub-forum and was surprised to see this thread had been bumped.

I'm relieved to see that you were able to make it work, so that's good news.

The Jeopardy thing works pretty well. I'll have to dig it out in the next few days and make sure it's shareable, and if it is I will put it up on the sourceforge.

Thanks for checking in! It feels very lonely in the BigButton camp sometimes.
It's great to hear that the Jeopardy game is working well.

Have you found it yet? If you have, please upload it to sourceforge as soon as you can. I have a presentation tomorrow, and it would be awesome if I could use it there.

If you can't find it by then, no worries, I can still use Trivia Host and PowerPoint as an alternative for the Jeopardy game.

Thank you, by the way, for all the hard work you've done to make using the Big Button controller in Windows possible.
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

https://sourceforge.net/projects/cjeopa ... ontroller/

Okay, I'm rushing this a little faster than normal, but you said you wanted it fast.

F9 loads round 1
F10 loads round 2
F11 loads final jeopardy
F12 plays think music

You need to use the FreePie script from above for the Big Buttons to be buzzers. It puts the buzzers on F1-F4, and then the multiple choice buttons are unused.

You need two screens to run it properly. A display for the players and a control screen for the host. The gameboard resolution is sort of hardcoded, so pick a screen resolution that makes it look good.

Questions are displayed by the host double clicking on the category number. Players can only buzz in once a question is displayed. If the player answers correctly, the host presses space and the points are added to his score and it returns to the board. Else the host presses enter and the points are deducted and the remaining players are able to answer. Just like Jeopardy! If no one buzzes in, you can double click the question and it will go away.

You can either edit the round XML files directly, or use the build in editor by pressing tab when the main game board has focus. To edit the player names (there are 4 players, since there are 4 BBCs), it's a really small players.xml that you have to edit manually.

The answers are presented in the answer window.

Finally, there is a point +/- screen that allows you to correct host errors, and handle final jeopardy. Final jeopardy- you'll have to use your imagination for this one. I just passed out scraps of paper and pencils, and then collected them once the music stopped.

Good luck!

(Jeopardy is a trademark of somebody, and this code is totally unofficial, etc, etc.)
Last edited by xhonzi on Wed Apr 02, 2014 6:10 pm, edited 2 times in total.
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

Actually, this freepie script should work:

Code: Select all

keyboard.setKey(Key.F1, xbox_BBC.getButton(1, "BB"))
keyboard.setKey(Key.F2, xbox_BBC.getButton(2, "BB"))
keyboard.setKey(Key.F3, xbox_BBC.getButton(3, "BB"))
keyboard.setKey(Key.F4, xbox_BBC.getButton(4, "BB"))
User avatar
xhonzi
Binocular Vision CONFIRMED!
Posts: 273
Joined: Wed Mar 31, 2010 3:35 pm
Location: Thornton, CO USA

Re: Could this support Xbox Big Button Controllers?

Post by xhonzi »

I almost forgot! You'll need the BBC plugins for FreePie. I just added them to the original BBC project at SourceForge. I put up both the .dll and .pdb. I don't know if you need the .pdb or if it's created by FreePie when you use the .dll.

Also- it's possible the plug doesn't work in the latest versions of FreePie. I know it works in 0.6.277.0.

EDIT: Let me confirm that it doesn't work on my other machine running a later version of FreePie. CyberVillain, if you're reading this, what is it going to take to make my plugin hip again? Just a recompile with the latest .dll?

EDIT 2: I recompiled. The other thing is my .dll has 2 buddies that need to go along with it. CyberVillain or Brantlew, is there way to compile my plugin so it doesn't need the original source .dlls- my driver dll and the libusb dll?

EDIT 2.5: At any rate- there's a new file in the original sourceforge: https://sourceforge.net/projects/xna-bi ... rce=navbar It has the 2 buddy .dlls that go in the base FreePie directory (ack!), and the file in the plugin folder goes in the freepie plugin folder. It may have trouble finding those buddy .dlls if your freepie is not in c:\program files (x86)\FreePie

:(

Good luck!
CyberVillain
Petrif-Eyed
Posts: 2166
Joined: Mon Jun 22, 2009 8:36 am
Location: Stockholm, Sweden

Re: Could this support Xbox Big Button Controllers?

Post by CyberVillain »

If you put them where freepie.exe is it should work
We have done changes to the contract since 0.6 thats why it does not work by the way
Post Reply

Return to “FreePIE”