Serial joystick driver?
Oldbitcollector (Jeff)
Posts: 8,091
I've got an idea for a Propeller project which incorporates using it's serial connection to the PC
to send PC joystick data. Does anyone know of a serial joystick driver? Google is giving me nothing useful.
I'm not only looking for the driver itself, but something which is documented so that I can replace it with a Prop.
Thanks!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
to send PC joystick data. Does anyone know of a serial joystick driver? Google is giving me nothing useful.
I'm not only looking for the driver itself, but something which is documented so that I can replace it with a Prop.
Thanks!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
Comments
Or, even use something along the lines of this: http://www.raphnet.net/electronique/snes_nes_usb/index_en.php
or if you have an atari joystick, this: http://www.raphnet.net/electronique/atari_usb/index_en.php
You can email that person for more details on their projects.
I hope this helps.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
MCU Projects·- my new site where I will be posting all projects, code, etc.
Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!
SD Card Adapter·- Add extra memory to your next Propeller project with ease!
What's the operating system and final destination program for the joystick data?
You might ultimately find it easier (and faster) to use the prop to spoof a joystick than go in serially.
Use something like sewelldirect.com/USB-to-Gameport-Adapter-for-Joysticks-Controllers-and-Gamepads.asp?source=froogle&utm_source=Froogle&utm_medium=cse&cvsfa=1306&cvsfe=2&cvsfhu=53572d35393639
The joystick pinout for a standard PC joystick is attached.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent!
Send $1 to CannibalRobotics.com.
That is where I might wind up when the USB driver becomes a little more developed.
I suspect it still may be a little raw at the moment.
@CannibalRobotics
The target machine is a Windows XP box.
I like your thought on this, but even the old fashion gameport is becoming a thing of history.
There are some really nice game controller objects for the Propeller. I thought it might be nice
to be able to share that with my PC via the Propeller interface.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
Not only that, when the Prop driver is done you'll have something else to post on the obex!
J-
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Signature space for rent!
Send $1 to CannibalRobotics.com.
edit I also attached the robotbasic program I use (rfbot.bas - I changed to a txt file so you could read it.)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
···································Fix it, if ain't broke!
D Rat
Dave Ratcliff N6YEE
Post Edited (ratronic) : 4/14/2010 11:03:25 PM GMT
The idea was to use the Propeller to provide an easy way to connect my N64, NES, SNES, or Gamecube controllers to the PC.
Thanks for posting that code! That robotBASIC looks extremely easy and straightforward. Might give it a look. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
Haven't given up on the original idea.. Beau pointed me back to PPjoy which DOES support joystick on COM port.
(I had written that program off as only supporting LPT sticks, etc.)
I suspect he is further along in the protocol, but one of us or both may post a working solution soon.
Pretty cool that a Propeller chip may allow you to use any of the following controllers on your PC soon....
Atari Joystick
obex.parallax.com/objects/87/
Gamecube controller
obex.parallax.com/objects/99/
N64 Controller
obex.parallax.com/objects/101/
Sony Controller
obex.parallax.com/objects/203/
NES & SNES Controller
obex.parallax.com/objects/111/
Wii Classic Controller
obex.parallax.com/objects/111/
Wii Nunchuck Controller
obex.parallax.com/objects/469/
Bet this would make a neat project for GadgetGangster.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
Post Edited (Oldbitcollector) : 4/19/2010 2:53:33 PM GMT
Something I was playing with this weekend... I Posted to the OBEX:
FMS Serial Joystick Driver v1.0.a
Supports:
FMS PIC 9600 baud (Generic)
FMS PIC 9600 baud (0xF0+ sync)
FMS PIC 19200 baud (0xFF sync)
Zhen Hua 5 byte protocol
James Newman,
In my searches I found some Serial drivers for Linux that would accept FMS protocols... I'm sure this would be possible using the same demo that I posted to the OBEX.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/20/2010 7:46:00 AM GMT
Take the usb california dreamin' demo (which is already recognised by windows as a USB HID device) and modify it for a joystick . I've been meaning to do it for years, but never quite got around to it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
You only ever need two tools in life. If it moves and it shouldn't use Duct Tape. If it does not move and it should use WD40.
Thanks Beau for helping me with this idea! Works perfectly!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
Post Edited (Oldbitcollector) : 4/25/2010 4:00:32 PM GMT
Thanks!, you bet.
I just want to mention... the FMS PIC 9600 baud (Generic) format is basically a (0xF0+ sync) where as long as the SYNC bit is $F0 or greater it's considered a SYNC. Some games capable of decoding FMS directly could be picky and require the correct number of Channels added to $F0 a requirement. PPJoy however is not that picky.
...That said to keep things kosher, the line in your code that reads... ser.tx($F0+2) 'sync ... is fine, but you could probably get away with it reading as ... ser.tx($F0) 'sync ... with the Generic format, but as I indicated earlier, some games that decode FMS directly might complain.
... Also, for the buttons, to detect simultaneous pressing you might want to use the 'or' operator. Currently it's in a priority configuration.
Change this ...
... to this ...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/21/2010 6:39:36 PM GMT
My alert buzzer is going off: Learning opportunity! [noparse]:)[/noparse]
Would you tell me the difference in behavior between your |= code and my := code?
Thanks!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
Post Edited (James Newman) : 4/21/2010 5:41:41 PM GMT
Using := bb is loaded as as priority mode, where the last condition has top prioity. For example in your code... button 'A' takes precedence over button 'B', and the 'START' buttton takes precedence over 'A' and 'B', while button 'SELECT' takes precedence over everything.
Using |= bb is 'OR'ed so the previous contents are preserved. This removes the priority mode aspect, and allows for simultanious button conditions.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Wow.. Thank you! Makes sense! Yes, a perfect change!
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
I've made the recommended changes, as well as fixed the buttons so that they are correct.
(At least with the NESten emulator.)
After playing Super Mario Bro's with the original interface, I'm not sure how we used the
Nintendo interface for all those hours without severe pain! Fingers cramped after 10 mins!
On to the N64 stuff. [noparse]:)[/noparse]
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.