[haiku-development] Joysticks in Haiku

  • From: "Carwyn" <cdj1000@xxxxxxx>
  • To: "Haiku-dev" <haiku-development@xxxxxxxxxxxxx>
  • Date: Tue, 08 Mar 2011 01:34:10 +0000

First of all may i say that the work you guys have done on Haiku is 
incredible,  I installed it on my system a few weeks ago and it just 
feels exactly like BeOS 'which of course is the idea :-)'.  Amazing 
work everyone.  I did help out a bit a long time ago with DirectWindow 
and Windowscreen along with Jack Burton(Stefano).

Now onto the joystick stuff,  i have read on the list that a lot of 
work has already been done on the joystick framework.  I fired up my 
old BeOS system and did some work to try and see how BeOS BJoystick 
really worked.

There is a high probability that some of the things i mention are 
already known,  so forgive me for that.  I know that _joystick_info has 
already been created in joysticktweaker but i'm confident that the 
following is correct.

Here is how the BJoystick _joystick_info *m_info is arranged,

struct button_names {
        const char *name;
};

struct axis_names {
        const char *name;
};

struct hat_names {
        const char *name;
};

struct _joystick_info { // size 0x428 (1064) bytes
        _joystick_module_info module_info;
        _extended_joystick sticks[4]; // offset 0x100 // correct
        
        char                    file_name[256]; // offset 0x1b0 // correct
        
        axis_names              axis_name[12]; // offset 0x2b0 // correct
        hat_names               hat_name[8]; // offset 0x2e0 // correct
        button_names    button_name[32]; // offset 0x300 // correct
        
        _extended_calibration calib[4]; // these are not correct
        char dummy[36]; // not correct
        // the above items are to do with calibration but i don't know 
exactly how they work yet
        bool calibration_enabled; // offset 0x424 // correct
};


Carwyn


Other related posts: