From: "Shawn Eary" Newsgroups: loki.games.descent3 Subject: Re: Everything But My Coolie!!! Date: Mon, 7 Jan 2002 01:38:52 -0600 Organization: Loki Entertainment Software Xref: news.lokigames.com loki.games.descent3:1252 Thanks Chunky: Your confimation about the hat being 2 axis allowed me to hack my "joydev.c"??? file. I don't remember exactly what the file name was, but any way: MAKE a BACKUP!!!! of joydev.c??? For 2.4.8: --- Step #1 Add the following line just before the return statment of the joydev_connect fucntion: // Makes programs and the driver think you have 4 extra buttons joydev->nkey += 4; --- Step #2 Add the lines similar to the following to the joydev_event function inside case EV_ABS: // EV_ABS means AXIS event static int leftOn = 1; // Needed for when you bring collie back to center static int upOn = 1; if (event.number == 4) { // 4 was the number of my left-right POV axis event.type = JS_EVENT_BUTTON; // Fake the computer out tell it we pushed a button if (event.value > 0) { // Right event.value = 1; // If the person pushes the right pos button set value to 1 (button pressed) event.number = 9; // The first of the extra buttons added earlier leftOn = 0; // Did the user go left or right? } else if (event.value < 0) { // Left event.value = 1; // Turn the ficticious button on event.number = 10; // One of our fiticious buttons leftOn = 1; // The person when left } else { // Person moved hat back to center event.value = 0; // Turn the ficticious button off if (leftOn) event.number = 10; else event.number = 9; } else if // Use chose up-down axis, map actions to buttons 11 & 12 // Hopfully you can figure out what goes here, if not, I can mail the hack to you // but it MAY only work for Sidewinder Precision Pro USB on 2.4.8 // and I don't care if you blow up your computer... ... } --- Step#3: cd /usr/src/linux make modules; make modules_install; If you didn't get any compile errors, and joydev.c. is a module on your kernel config. You can start up Descent and configure your hatswitch for the slide up, down, left and right functions. Descent will think that it is buttons 9, 10, 11, and 12. Before you define any new actions for your collie, you might want to clear out the old actions since you might blow up your computer if you try and use the collie as both an axis and a buttons switch, anyway... It worked great for me!!!! and D3 under Linux ROCKS!!!!! Shawn (p.s. I won't be surprised if I forgot something since it is way past my bedtime.)