Search found 79 matches

by richw
Tue Apr 10, 2018 10:01 pm
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

And I think keymapping in the boot scripts is also sensible. Would be nice to do it in a way which isn't bespoke to USBJoystick... Maybe with a *command alias, which I can deal with? I need to dream up some commands for the keymapping too.
by richw
Tue Apr 10, 2018 10:00 pm
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

Hi Jon, Sorry, I have had a busy few days, so no RISC OS time! I think my next two tasks will be multiple buttons (just need to decide how to fit that onto the *command) and keyboard emulation. I have your example code on that, and I was also reading the RISC OS 5 USB keyboard driver for inspiration...
by richw
Fri Apr 06, 2018 8:24 pm
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

Hmm. I could see if I can do the scaling without the floats - some sort of integer only approximation. I wonder about the limitations from C, yet when I was looking at the code for EtherUSB, there were comments regarding reentrancy. If it is possible to code a network driver and an SD card file syst...
by richw
Thu Apr 05, 2018 9:08 pm
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

Ah, OK. I thought you were trying to determine the module's behaviour from looking at the games! I had the zip sitting on my Pi. I think I downloaded it a long time ago when I first had the idea for the driver. Somewhere, I probably have the original floppy and parallel port interface! So would it b...
by richw
Thu Apr 05, 2018 8:31 pm
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

I have found VTJoystick! Having a quick look in StrongEd's disassembly, it looks like the SWI base is &81540, with the following SWIs: VTJoystick_Status VTJoystick_Define VTJoystick_Load VTJoystick_Die VTJoystick_Read also two *commands: *JoystickLoad *JoystickDie I can guess what a few of these do,...
by richw
Thu Apr 05, 2018 1:26 pm
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

I suspect I should change USBJoystick to return 64 for switched joysticks. Or maybe make the thresholds configurable via a *command.

Regarding the boot scripts, I was thinking of something more dumbed down, like a *command alias. But I see what you mean, the boot scripts are editable enough.
by richw
Thu Apr 05, 2018 9:55 am
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

Just a thought on boot scripts... might it be an idea to abstract any changes you make regarding joysticks? i.e. don't bake in anything specifically for USBJoystick, but use some *command aliases or whatever so that ADFFS or USBJoystick can pick them up. You never know, other solutions could exist (...
by richw
Wed Apr 04, 2018 11:01 pm
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

To be honest, the little time I’ve had has been spent on the driver coding (not so much the games!). I have still only tried those I mentioned in my first post, plus Chuck Rock (for the new Joy_ SWIs). Am I right that these are still issues: - Xenon 2 (ADFFS): only fire button works, no directions -...
by richw
Wed Apr 04, 2018 9:16 pm
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

I’ve had a little time, so updated the first post to version 0.06 which implements the Joy SWIs previously discussed. Chuck Rock is working for me. I’m currently using the last public release of ADFFS - only issue was that on quitting Chuck Rock, I get ‘Module JoyStick not found’, which I think is c...
by richw
Tue Apr 03, 2018 5:02 pm
Forum: Pi
Topic: USB Joystick driver
Replies: 112
Views: 8594

Re: USB Joystick driver

Thanks. I wrote that down, but for some reason I was doubting it. Not sure why! Anyway, I've put my scale function into a spreadsheet and can see why it is barfing, and have fixed it. Just need to put that into the C code, but I'll try and do that as I put the Joy SWIs in. Note that I'll only be abl...