Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
#4221388 - 01/25/16 06:55 PM Wile's controller: tales from the nerd-castle  
Joined: Jan 2011
Posts: 1,527
WileECoyote Offline
Member
WileECoyote  Offline
Member

Joined: Jan 2011
Posts: 1,527
Argentina
Hello there.

So I decided to start posting about this project I'm working on, not only to show off smile but also because this way people can give me feedback and ideas that I maybe didn't have.

Also, be sure to check this thread. There's a prize involved. wink

My project is basically a generic joystick software for DIYers. In its basic form, you load the code into an Arduino or Teensy or similar board, and you have a joystick with axis and buttons. Period.

But, said joystick also supports profiles in the fashion of a CH or Saitek or Thrustmaster controller. You don't need to, but if you want, you can write a profile to do some convoluted stuff and save it to a file. You then upload the one you want before playing.

Now, the philosophy here is "make easy things, easy, and complicated things, easy-ish" ideally, it should hide enough that you don't need to learn things you don't need. A person that knows nothing about electronics or programming should be able to make a simple controller without much effort and then go on from there if he wants to build something more complex.

To that end, the firmware should handle pretty much anything, leaving the user only a small work to do, and probably automateable, say with a wizard of some sort. While at the same time it should allow tinkering with it so more knowledgeable folks or without girlfriends smile can waste their time building something more advanced.

And here's where I am right now. I have the basic firmware, it handles inputs and everything on its own, the only thing you have to do right now is a little coding to feed the inputs to it. Once the input states are loaded, the firmware is able to interpret them to send the presses to the computer or, if a profile is loaded, process that and do what's needed.

Speaking of profile. My previous project (linky) had this same functionality. The language in which you wrote these profiles was nice and simple... and not that powerful. And that's the thing. I'd like this new one to be simple for simple things, but more powerful if needed. My goal is "It doesn't look like a programming language at first, but you must be able to write a simple game with it". I'm set in my ways. biggrin




That's the most basic profile you can do. Two buttons, one sends Ctrl-A and the other sends F2. Buttons not specified, if any, will just report to the computer as a normal joystick button.

Also, that ":controller: 'JOYPRJ1'" part is important.

My idea here is that you might want to have more than one controller. I my self am planing on having at least 2. My already built panel, upgraded to the new firmware, and either a trim panel, or a UFC panel for Falcon.

The PC software has to be able to identify which device is which so it loads the profile to the correct controller. To that effect, you have to write an INI file for each of your controller types. In this case, you would have a file called "joyproj1.ini" somewhere with the lines:



The profiler will read this file to know what inputs you have available and their types ("onoff" being a simple push button). So when you say "[BTN_1]" it knows that there's such a thing as BTN_1 and that it is a pushbutton.

All this is pretty much just day dreaming at this point. But I don't see why I couldn't pull it off... I hope. biggrin


When you're feeling sad, just remember that somewhere in the world, there's someone pushing a door that says "pull".
Inline advert (2nd and 3rd post)

#4221405 - 01/25/16 07:17 PM Re: Wile's controller: tales from the nerd-castle [Re: WileECoyote]  
Joined: Apr 2015
Posts: 13,734
F4UDash4 Offline
Veteran
F4UDash4  Offline
Veteran

Joined: Apr 2015
Posts: 13,734
SC
Im going stick with my factor built CH stick / throttle / pedals for now but I will be very interested in this if I can use it to interface between simpit buttons and the PC.

Support for a variety of physical switch types would be cool.


"In the vast library of socialist books, there’s not a single volume on how to create wealth, only how to take and “redistribute” it.” - David Horowitz
#4221477 - 01/25/16 09:02 PM Re: Wile's controller: tales from the nerd-castle [Re: WileECoyote]  
Joined: Jan 2011
Posts: 1,527
WileECoyote Offline
Member
WileECoyote  Offline
Member

Joined: Jan 2011
Posts: 1,527
Argentina
That's the idea, something people with 0 experience can use, but also as a drop-in thing people with already existing ardware can use as well.


When you're feeling sad, just remember that somewhere in the world, there's someone pushing a door that says "pull".
#4221527 - 01/25/16 11:49 PM Re: Wile's controller: tales from the nerd-castle [Re: WileECoyote]  
Joined: Nov 2001
Posts: 3,955
Sokol1 Offline
Senior Member
Sokol1  Offline
Senior Member

Joined: Nov 2001
Posts: 3,955
Internet
The 3rd part existent keymappers have some nice features - but no one have all - desirable to see in a "definitive" keymapper:

Joy2Key: sequential "combos", press the button 1 time send a key/combo (up to 4 keys), press again send another, etc. up to 4 different sequences.
Or will switch between this combos based on button press time, up to 100ms one combo, above 100 other.
Up to 16 layers, that allow map complex things like DCS Mig-21 Weapon Selector, that use 11 different key press.
Ability to map one button to be pressed only if a give button is pressed.

XPadder: endless keys/combos with adjustable pause times between keys and end of sequence - the result is similar to Joy2Key sequences.

SVmapper: ability to map a key on press and realese of button - usefull for map ON-OFF toggle switches.

Joy2Key and Xpadder have ability to map axis to press buttons, but both lack ability to divide axis in bands, like Pinacle game profiler, a desirable feature.


A good thing is ability to store this config in controller EEPROM - like old Thrustmaster's or VKB Config, not using Windows program in background, like the COTS HOTAS and his eventually BSOD.



#4221547 - 01/26/16 12:40 AM Re: Wile's controller: tales from the nerd-castle [Re: WileECoyote]  
Joined: Jan 2011
Posts: 1,527
WileECoyote Offline
Member
WileECoyote  Offline
Member

Joined: Jan 2011
Posts: 1,527
Argentina
Excellent points. And to that I say:

Press / hold / release is already there:



At his point, there's no functionatily for first and second press. But, if I had to do it with what the profiling language has to offer right now. I'd do this:




Or also:




But I'll certainly think about this!


On shifting buttons:



Here's one interesting experiment. I always liked the mode swtich in my Saitek X-52, it's a 3-positon rotary and puts your joystick in any of the three "layers".

Lets say we wanted to do something similar, via a 3-position switch. Lets say each position is an independant on/off button as far as the firmware is concerned. We could do something like this:




Axis to press a button, aka "segmented axis" is also planned. And it goes like this:



Direction detection, say when the axis enters a segment going down, or up is not planned. Or rather, I haven't given much thought to it. But I wil.


Last edited by WileECoyote; 01/26/16 12:48 AM.

When you're feeling sad, just remember that somewhere in the world, there's someone pushing a door that says "pull".
#4221582 - 01/26/16 03:13 AM Re: Wile's controller: tales from the nerd-castle [Re: Sokol1]  
Joined: Jan 2011
Posts: 1,527
WileECoyote Offline
Member
WileECoyote  Offline
Member

Joined: Jan 2011
Posts: 1,527
Argentina
Originally Posted By: Sokol1
A good thing is ability to store this config in controller EEPROM - like old Thrustmaster's or VKB Config, not using Windows program in background, like the COTS HOTAS and his eventually BSOD.


I missed this in my previous reply.

EEPROM is the best of course. But EEPROM is also small in most chips...

My biggest fear is that if you make too big of a profile it will not fit in EEPROM, and then you're screwed! That's why the firmware can use RAM (a Teensy has 65K of it vs the 1 or 2 KB of EEPROM) or an SD card module... where you would have gigabytes of non-volatile (and little slower) storage!

And yes, once the profile is uploaded, no Window program is needed. The thing is a self sufficient and standard joystick/keyboard.

I actually tried my other project, the panel, in my MAME cabinet that's running Windows XP. I uploaded Sub Zero fatalities for Mortal Kombat III using my Win7 machine. And then went and plugged it in the arcade... worked like a charm. smile


When you're feeling sad, just remember that somewhere in the world, there's someone pushing a door that says "pull".

Moderated by  RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
Carnival Cruise Ship Fire....... Again
by F4UDash4. 03/26/24 05:58 PM
Baltimore Bridge Collapse
by F4UDash4. 03/26/24 05:51 PM
The Oldest WWII Veterans
by F4UDash4. 03/24/24 09:21 PM
They got fired after this.
by Wigean. 03/20/24 08:19 PM
Grown ups joke time
by NoFlyBoy. 03/18/24 10:34 PM
Anyone Heard from Nimits?
by F4UDash4. 03/18/24 10:01 PM
RIP Gemini/Apollo astronaut Tom Stafford
by semmern. 03/18/24 02:14 PM
10 years after 3/8/2014
by NoFlyBoy. 03/17/24 10:25 AM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0