HobbyKing.com New Products Flash Sale
Reply
Thread Tools
This thread is privately moderated by Malc C, who may elect to delete unwanted replies.
Old Jan 05, 2010, 02:17 PM
Official Old Git!
Hampshire, UK
Joined Sep 2000
1,398 Posts
Quote:
Originally Posted by Telemachus View Post
do u need 8 axis?
Looks like I might - don't have any switches available to switch gear etc.
I may have to see if I can spot the difference perhaps with the USB speed in the code, modify it and give that a try.
Norman Adlam is offline Find More Posts by Norman Adlam
Reply With Quote
Sign up now
to remove ads between posts
Old Jan 05, 2010, 03:18 PM
Heli Humbled Daily
Riverside, CA
Joined Jul 2006
2,973 Posts
Most simulator software will let you assign keyboard keys for gear/idle up, etc.

Also, I don't know that Alessio monitors this threat anymore. You might want to get his thoughts at:

http://www.rcgroups.com/forums/showt...=568806&page=5
Telemachus is offline Find More Posts by Telemachus
Reply With Quote
Old Jan 05, 2010, 04:28 PM
Official Old Git!
Hampshire, UK
Joined Sep 2000
1,398 Posts
Quote:
Originally Posted by Telemachus View Post
Most simulator software will let you assign keyboard keys for gear/idle up, etc.

Also, I don't know that Alessio monitors this threat anymore. You might want to get his thoughts at:

http://www.rcgroups.com/forums/showt...=568806&page=5
Yup - I did actually try to directly chat with Alessio over the holiday period, but he didn't reply.

BTW - does anyone have a better description / understanding of the channel assignments methodology etc? I find the description in the documentation (code and user docs) quite confusing - and aggravated by the crazy way that Windows seems to display them (2 joysticks - but you only use one - with 'z', slider, dial etc etc )

I can get things to work OK - but between the PIC channel assignments, Windows drive and sim channel setup it gets a bit hiss and miss and silly!
Norman Adlam is offline Find More Posts by Norman Adlam
Reply With Quote
Old Jan 05, 2010, 04:53 PM
Heli Humbled Daily
Riverside, CA
Joined Jul 2006
2,973 Posts
Yes, the english gets a little sketchy, but the assignments work well.

If you edit the file set_assigments, you will see lists of tables like this:

AssignTab1
1 ; Modulation
1 ; Ch1
2 ; Ch2
3 ; Ch3
4 ; Ch4
5 ; Ch5
6 ; Ch6
7 ; Ch7
8 ; Ch8
9 ; Ch9
10 ; Ch10
11 ; Ch11
12 ; Ch12

with several tab numbers. The first number sets the modulation type of the radio:

; modulation codes summary:
;
; 0 (0x00) = ADC mode:
; 1 (0x01) = PPM/PCM mode: PPM
; 2 (0x02) = PPM/PCM mode: Sanwa/Airtronics PCM1
; 3 (0x03) = PPM/PCM mode: Sanwa/Airtronics PCM2
; 4 (0x04) = PPM/PCM mode: Futaba PCM 1024
; 5 (0x05) = PPM/PCM mode: Walkera PCM

1 works well for most radios. After that, you can assign how each of the channels of the radio is mapped out the the two different joysticks, as follows:

0 (0x00) = none (relative channel ignored)
;
; 1 (0x01) = Joy1 X axis
; 2 (0x02) = Joy1 Y axis
; 3 (0x03) = Joy1 Z axis
; 4 (0x04) = Joy1 RotX axis
; 5 (0x05) = Joy1 RotY axis
; 6 (0x06) = Joy1 RotZ axis
; 7 (0x07) = Joy1 Dial axis
; 8 (0x08) = Joy1 Slider axis
; 9 (0x09) = Joy1 Button 1
; 10 (0x0a) = Joy1 Button 2
; 11 (0x0b) = Joy1 Button 3
; 12 (0x0c) = Joy1 Button 4
; 13 (0x0d) = Joy1 Button 5
; 14 (0x0e) = Joy1 Button 6
; 15 (0x0f) = Joy1 Button 7
; 16 (0x10) = Joy1 Button 8
;
; 17 (0x11) = Joy2 X axis
; 18 (0x12) = Joy2 Y axis
; 19 (0x13) = Joy2 Z axis
; 20 (0x14) = Joy2 RotX axis
; 21 (0x15) = Joy2 RotY axis
; 22 (0x16) = Joy2 RotZ axis
; 23 (0x17) = Joy2 Dial axis
; 24 (0x18) = Joy2 Slider axis
; 25 (0x19) = Joy2 Button 1
; 26 (0x1a) = Joy2 Button 2
; 27 (0x1b) = Joy2 Button 3
; 28 (0x1c) = Joy2 Button 4
; 29 (0x1d) = Joy2 Button 5
; 30 (0x1e) = Joy2 Button 6
; 31 (0x1f) = Joy2 Button 7
; 32 (0x20) = Joy2 Button 8

For some programs, like the older Real Flight G2, this was needed, since it looked for sticks on two different controllers.

At the very end of the file, you select which table you want to use from those in the file. It defaults to using table 1, but you can change it to select whichever table you want.

Does this help at all?
Telemachus is offline Find More Posts by Telemachus
Reply With Quote
Old Jan 05, 2010, 05:22 PM
Official Old Git!
Hampshire, UK
Joined Sep 2000
1,398 Posts
Quote:
Originally Posted by Telemachus View Post
Yes, the english gets a little sketchy, but the assignments work well.

If you edit the file set_assigments, you will see lists of tables like this:

AssignTab1
1 ; Modulation
1 ; Ch1
2 ; Ch2
3 ; Ch3
4 ; Ch4
5 ; Ch5
6 ; Ch6
7 ; Ch7
8 ; Ch8
9 ; Ch9
10 ; Ch10
11 ; Ch11
12 ; Ch12

with several tab numbers. The first number sets the modulation type of the radio:

; modulation codes summary:
;
; 0 (0x00) = ADC mode:
; 1 (0x01) = PPM/PCM mode: PPM
; 2 (0x02) = PPM/PCM mode: Sanwa/Airtronics PCM1
; 3 (0x03) = PPM/PCM mode: Sanwa/Airtronics PCM2
; 4 (0x04) = PPM/PCM mode: Futaba PCM 1024
; 5 (0x05) = PPM/PCM mode: Walkera PCM

1 works well for most radios. After that, you can assign how each of the channels of the radio is mapped out the the two different joysticks, as follows:

0 (0x00) = none (relative channel ignored)
;
; 1 (0x01) = Joy1 X axis
; 2 (0x02) = Joy1 Y axis
; 3 (0x03) = Joy1 Z axis
; 4 (0x04) = Joy1 RotX axis
; 5 (0x05) = Joy1 RotY

; 6 (0x06) = Joy1 RotZ axis
; 7 (0x07) = Joy1 Dial axis
; 8 (0x08) = Joy1 Slider axis
; 9 (0x09) = Joy1 Button 1
; 10 (0x0a) = Joy1 Button 2
; 11 (0x0b) = Joy1 Button 3
; 12 (0x0c) = Joy1 Button 4
; 13 (0x0d) = Joy1 Button 5
; 14 (0x0e) = Joy1 Button 6
; 15 (0x0f) = Joy1 Button 7
; 16 (0x10) = Joy1 Button 8
;
; 17 (0x11) = Joy2 X axis
; 18 (0x12) = Joy2 Y axis
; 19 (0x13) = Joy2 Z axis
; 20 (0x14) = Joy2 RotX axis
; 21 (0x15) = Joy2 RotY axis
; 22 (0x16) = Joy2 RotZ axis
; 23 (0x17) = Joy2 Dial axis
; 24 (0x18) = Joy2 Slider axis
; 25 (0x19) = Joy2 Button 1
; 26 (0x1a) = Joy2 Button 2
; 27 (0x1b) = Joy2 Button 3
; 28 (0x1c) = Joy2 Button 4
; 29 (0x1d) = Joy2 Button 5
; 30 (0x1e) = Joy2 Button 6
; 31 (0x1f) = Joy2 Button 7
; 32 (0x20) = Joy2 Button 8

For some programs, like the older Real Flight G2, this was needed, since it looked for sticks on two different controllers.

At the very end of the file, you select which table you want to use from those in the file. It defaults to using table 1, but you can change it to select whichever table you want.

Does this help at all?
Thanks, Telemachus - I had worked out most of that (well the table selection and channel assignments bits). It's particularly easy do that with the set_assignments utility! I normally select table2, as I have a JR Tx.
I actually have no problem with Alessios English, I think it's quite good actually.

What confuses me are things like
"; 3 (0x03) = Joy1 Z axis
; 4 (0x04) = Joy1 RotX axis
; 5 (0x05) = Joy1 RotY axis
; 6 (0x06) = Joy1 RotZ axis
; 7 (0x07) = Joy1 Dial axis
; 8 (0x08) = Joy1 Slider axis"

... and the same for joystick2.

On my Tx (JR) it displays Ch.1 = Throttle, Ch2 = Ail, Ch 3= Ele, Ch 4 = Rud, CH 5 = Gear, CH 6 = FLP, Then Aux2, Aux3 and Aux4.

So why wouldn't I have 1,2,3,4,5,6 etc as channels in the sim as 1,2,3,4,5,6 etc. And why do I care about Z axis, RotX, RotY, Dial, Slider etc? It's just (effectively) analogue channels on my Tx? (OK it's actually a variable pulse position in a fixed frame-rate, that the pic translate into an analogue variable)

Also, why 2 Joysticks - when you have defined the channels based on what's in your Tx?

I do understand that there are a number of interactions...

1) The translation of the Tx channel output in the PIC (definitions in the source and using the set_assignments etc )

2) The way that Windows takes the Pic "channel" and translates them.

3) The sim program, which can also translate the "channel" coming from the Windows device driver.

But I don't have a clear picture on what I should be setting, where, and why. I make (intelligent?) guesses and also trial and error. I do end up with a working sim dongle, but it's not clear what should be changed for why.
Norman Adlam is offline Find More Posts by Norman Adlam
Reply With Quote
Old Jan 05, 2010, 05:41 PM
Heli Humbled Daily
Riverside, CA
Joined Jul 2006
2,973 Posts
The whole reason for two joysticks (Malc Pioneered this, so he can verify) is because Real Flight G2 required 2 joysticks. By being able to selectively map channels to 2 different controllers in any configuration possible, it guaranteed it to work with older Real Flight.

With the newer versions, you just use a dongle emulator... or so I am told.
Telemachus is offline Find More Posts by Telemachus
Reply With Quote
Old Jan 06, 2010, 10:59 AM
Registered User
UK
Joined Oct 2003
3,822 Posts
Quote:
Originally Posted by Telemachus View Post
The whole reason for two joysticks (Malc Pioneered this, so he can verify) is because Real Flight G2 required 2 joysticks.

Errr.. I can.. ?

Basically it was Mark that did all the bulk of the coding and conversion of Allesio's original code. My part really was in the hardware development and testing the code with both JR and Futaba TX's

Allesio then came along and tweaked / re-wrote his code further.
Malc C is offline Find More Posts by Malc C
Reply With Quote
Old Jan 06, 2010, 11:00 AM
Registered User
UK
Joined Oct 2003
3,822 Posts
Quote:
Originally Posted by Telemachus View Post

With the newer versions, you just use a dongle emulator... or so I am told.
Tch tch ! - wouldn't really know about those things
Malc C is offline Find More Posts by Malc C
Reply With Quote
Old Jan 06, 2010, 11:12 AM
Registered User
UK
Joined Oct 2003
3,822 Posts
Norman,

Are you using Mine/MJ 8 channel code or Allessio's ? - If Allessio's do you get the same issue when using our original 8 ch code in post 1
Malc C is offline Find More Posts by Malc C
Reply With Quote
Old Jan 06, 2010, 11:43 AM
Heli Humbled Daily
Riverside, CA
Joined Jul 2006
2,973 Posts
The issue might be, if he built the circuit to the specifications of the newest A&A code, then your original code might not work with it, because A&A cut out the pull up resistor on MCLR by doing it in the code, as well as several resistors on the transistor side... I have found that building it to the original specs is best, because then it works with all the codes out there.
Telemachus is offline Find More Posts by Telemachus
Reply With Quote
Old Jan 07, 2010, 11:51 AM
Registered User
UK
Joined Oct 2003
3,822 Posts
Quote:
content removed - Reason - Discussing possible copyright circumvention
At first I was going to moderate the tread by deleting these posts as it is technically discussing a way of circumventing the copy protection as your friend (yeah right !) doesn't own a retail copy of the simulator. However it does give me an opportunity to clarify a few things.

Yes it would be possible to program a PIC to emulate the dongle supplied with any of the top commercial simulators. You would need to decipher the algorithms used, and work out any other levels of encryption, but once this was done it wouldn't be too difficult to then write the code and program a chip. However the act of doing so not only breaches the copyright, terms and conditions of use, it also breaches, to a degree, the intellectual property rights of the developer.

Having said that, we all live in the real world and by the claims on some listings on e-bay and on other forums I'm sure that such 3rd party interfaces no doubt exist.

Can I just make it clear to anyone reading this thread, the project files here are for a device that emulates a standard windows joystick. They do not, and will not work as a primary controller on any interlinked simulator, and I do not condone any modification of the code in a bid to do otherwise .

Sorry to say that any further discussion on the subject of using dongle emulators will be moderated.
Malc C is offline Find More Posts by Malc C
Last edited by Malc C; Jan 07, 2010 at 03:15 PM.
Reply With Quote
Old Jan 07, 2010, 03:10 PM
Registered User
UK
Joined Oct 2003
3,822 Posts
Quote:
Originally Posted by Martin Y View Post
AS I DO OWN A RETAIL COPY OF IT (original pix and PS copy for your veiwing pleasure) then your can't take a joke. And to the rest of your rant, yada yada yada.
If you own the retail copy then why are you asking about making an interface for your mate...

Circumventing copy protection is no joke....

My response was factual, and not a rant... seeing that you feel that way its time to do some moderating...
Malc C is offline Find More Posts by Malc C
Reply With Quote
Old Jan 21, 2010, 01:40 PM
Heli tinkerer
Barbados
Joined Dec 2006
172 Posts
Hello,

I was wondering if this code would work on a 16f8771? It's the only ic i've got at the moment.
Thanks.
Praetorious is offline Find More Posts by Praetorious
Reply With Quote
Old Jan 21, 2010, 02:54 PM
Heli Humbled Daily
Riverside, CA
Joined Jul 2006
2,973 Posts
I think you need 18F for USB. Samples are free from microchip
Telemachus is offline Find More Posts by Telemachus
Reply With Quote
Old Jan 21, 2010, 04:37 PM
Heli tinkerer
Barbados
Joined Dec 2006
172 Posts
Ahh, thanks.
Think I'll procure some samples.
Praetorious is offline Find More Posts by Praetorious
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question JW24RC - Model RC to USB joystick converter chip skratchbilder Radios 0 Dec 16, 2004 07:43 PM
Quattro USB adapter: RC, Analog Joystick -> USB PiNa Simulators 2 Sep 22, 2004 01:09 PM
Radio Shack USB joystick adapter. HankF Simulators 0 Jul 23, 2003 01:46 PM