I'm not really having any huge problems, but thought I'd post anyway in the hope that somebody can tell me what on earth is going on, or if anybody else has had similar problems maybe what I managed to randomly find out could help. I'm a complete Ubuntu amateur so it wouldn't surprise me if somebody comes along and tells my I've been doing something stupid, wrong, dangerous or just plain weird.
Many months ago, I installed a pixel art programme from the repositories, and tried to use it. But the cursor kept shooting to the top left corner of the screen. Weird, but I just moved on to other things. I probably would have forgotten about it too if it wasn't for a few weeks ago, I installed a game called Paintown, and my characters would all move to the top left corner of the screen.
A lightbulb went off in my head! Maybe my computer thinks there is a joystick attached even though there isn't. I did some Googling and learned about /dev/input/js0 which was on my computer. I did a probably reckless thing and just deleted it.
Ta-dah, my character no longer kept moving up and to the left, and instead just responded to my keyboard controls. Success!
I've rebooted my computer many times since then, and js0 always comes back. But it's no big problem to delete it again whenever I want to use that game or other software.
Anyway, since all this got me curious about joysticks, I borrowed (stole from a family member) an xbox 360 controller, downloaded a few joypad setup programmes and a fricken awesome programme called qjoypad which lets me map the joypad to my keyboard. And I've been using it successfully to play various new games or emulated old games from the 80s and 90s.
By the way, setting up the dead zone for joypads in Ubuntu is a huge pain in the rear. I had to use jscal to set up the joystick, then manually edit the text output to increase the size of the dead zone, coming up with this monstrosity
I have to do that every time I want to use my joypad after a reboot. I haven't figured out how to make it remember between reboots yet. But it's only a minor annoyance.
jscal -s 8,1,0,-2500,-1200,17348,15570,1,0,-25,1000,16742,16685,1,0,0,0,-2147483648,2105312,1,0,-2800,-2800,17915,15094,1,0,-300,800,16269,16560,1,0,0,0,-2147483648,2105312,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/input/js0
Oh it says js0, because when I plug in a joystick, it gets assigned as js1. So I just delete js0 and rename js1 as js0. It works, but it's probably not what I'm supposed to do.
Anyhoo, while learning how to do all that, I learned about jstest. And decided to use it on the mysterious js0. And the first line of output says
Which I've never owned, heard of or used before. 37 axes?! wow
Joystick (A4Tech USB Full Speed) has 37 axes
A bit more noseying about, I decided to just look at what js0 was doing in hex by doing xxd /dev/input/js0
I've watched it a while, and apparently it's mostly just counting, though a few bits seem to change randomly too. I've tried hitting keys, wiggling my mouse, fiddling with the joystick and anything else I could think of. Nothing seems to influence js0 in any way I can discover.
0000000: e01c bc00 0000 8100 e01c bc00 0000 8101 ................
0000010: e01c bc00 0000 8102 e01c bc00 0000 8103 ................
0000020: e01c bc00 0000 8104 e01c bc00 0000 8105 ................
0000030: e01c bc00 0000 8106 e01c bc00 0000 8107 ................
0000040: e01c bc00 0000 8108 e01c bc00 0000 8109 ................
0000050: e01c bc00 0000 810a e01c bc00 0000 810b ................
0000060: e01c bc00 0000 810c e01c bc00 0000 810d ................
0000070: e01c bc00 0000 810e e01c bc00 0000 810f ................
etc... blah blah blah...
0000260: e01c bc00 0180 8223 e01c bc00 0180 8224 .......#.......$
It always stops at line 260.
So yeah that's about as far as I've got so far.
Anybody have a clue why it's doing this, what's going on, or can anybody point at me and and laugh saying "oh my god you noob, you should do XXXXX not XXXXX, it's obvious"