|
|
|
#103 (permalink) |
|
Registered User
Join Date: Nov 2007
Location: ca
Posts: 3
|
I'm back and as promised I've attached the source code for zeropad modified to handle joysticks. I hope that anyone working on a linux pad plugin finds it useful. (and that it works)
The code is still missing a gui but everything can be changed in the config file. Compile, copy to plugins/ install, then delete your old zeropad.ini. If logging is enabled (default) the plugin will list the key codes that are used by the new config. |
|
|
|
|
|
#105 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 413
|
dolch : thanks a lot.
dista_bagus : If you don't have a joystick the error you got is NORMAL. So don't waste my time with stupid questions. PS : dolch : I've Glade, so I can design a gui very easily. |
|
|
|
|
|
#108 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 413
|
I need to install GTK libs, this is very complicated, I reinstalled my Linux 2 times because Linux wanted me to clear some packages to install others, I've cleared them, I couldn't more compile nor reinstall g++ package.
|
|
|
|
|
|
#109 (permalink) |
|
Registered User
Join Date: Oct 2007
Location: United States
Posts: 18
|
Wow, nicely done, dolch! My only problem now is that I have the keycodes I need for my pad, but I don't know what corresponds to what in your ini file, so.. I don't know which things to assign them to. I tried comparing to the original zeropad ini, but it doesn't even seem to follow a similar format to that. And there are so many more per pad... Any chance you could give us a little cheat sheet to work with?
|
|
|
|
|
|
#110 (permalink) |
|
Registered User
Join Date: Feb 2007
Location: Terra Firma
Posts: 19
|
Based on observation, it appears to be something like this:
[0][0] L2 [0][1] R2 [0][2] L1 [0][3] R1 [0][4] triangle [0][5] circle [0][6] cross [0][7] square [0][8] select [0][11] start [0][12] up [0][13] right [0][14] down [0][15] left [0][16] left analog up [0][17] left analog down [0][18] left analog right [0][19] left analog left [0][20] right analog up [0][21] right analog down [0][22] right analog right [0][23] right analog left That's entirely based on my own mappings, though, so there's room for error. And, as you may have noticed, I don't have the analog buttons mapped... |
|
|
|
|
|
#111 (permalink) |
|
Registered User
Join Date: Oct 2007
Location: United States
Posts: 18
|
That's pretty much how I had it set... I guess the plugin is somehow just glitching with my Logitech Cordless Rumblepad 2...? Things are showing up in the log different from how I set them in the ini, most of which as [0][-1], others as other random buttons, and so on. Ah well, I can wait until things get ironed out a bit. Thank you, though!
|
|
|
|
|
|
#112 (permalink) |
|
Registered User
Join Date: Feb 2007
Location: Terra Firma
Posts: 19
|
Just to clarify a bit, here's what I would do. Print out the chart I gave on a piece of paper, then open up pcsx2.
Systematically push every button, and push each stick in each direction. Jot down what it tells you by the appropriate button on my list. Lets say the log said [0][-1]=0x05 when you pushed the triangle key. Write 0x05 down by the spot I said was the triangle key, [0][4]. The part in brackets is what that button is currently set to, and the number after the equals sign is the actual number of the button you pressed, in hexadecimal. So next, you go to the ini file, go to each one of the numbers in brackets I listed, and change what it equals to whatever you wrote down on the sheet of paper. Hopefully someone writes a gui for it soon, though. Or dolch makes the ini file a bit more friendly... --Shanoah |
|
|
|
|
|
#113 (permalink) |
|
Registered User
Join Date: Oct 2007
Location: United States
Posts: 18
|
Yes, I know the process. That's what I did when I first got the plugin. I just asked for key because I assumed I was doing something wrong--it just does not work when I do it that way.
I've attached my ini (zeropad.ini.txt) and a list of my keycodes (joypad notes.txt). The square button is supposedly 0x0, but it looks like this is what the ini uses as the default for buttons that haven't been set. I thought this could be the problem, but tried changing the other 0x0 values to something else, and nothing helped. I even tried removing them from the ini entirely and it didn't fix the problem--it made some buttons begin to work, but for the wrong things. Anyway, the pasted ini makes the log look like (padlog.txt). All values are [0][-1] except that square button, which is [0][0] It's all very confusing. Hopefully I'm just doing something wrong, but, for everything I've tried, it seems to me like things should be working... they just aren't. Any more help would be greatly appreciated! Thank you very much! Last edited by Booma; December 4th, 2007 at 03:59. |
|
|
|
|
|
#114 (permalink) |
|
Registered User
Join Date: Feb 2007
Location: Terra Firma
Posts: 19
|
Hmmm... Think I might have posted a bit too quickly with that chart. Think I should have added 24 to the second number, because the first set is the keyboard. Trouble is, I trusted the numbers the log shows, and it looks like they are off by one gamepad, because the initial 24 are the keyboard.
I'd delete the ini file, then run pcsx2 to regenerate the file, then try putting them in for 24 on instead. Starting with the one I labeled as [0][0] being [0][24]. Another, rather dirty way to get around it is to actually go in the file linux.cpp, and actually go around line 138 or so, and edit the default values, then recompile and delete the ini file. Unfortunately, that section of source code actually is easier to read then the ini file... |
|
|
|
|
|
#116 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 413
|
There has been a while I didn't give news.
I'm progressing, I successfully installed libgtk2.0-dev package (provided in the adept package manager) and got USBnull to compile. I changed the name, the plugin shown up into the USB plugin list. I only need to change the USB.c file to PAD.cpp file, same with Linux.c file (Linux.cpp) and create a GUI with Glade. I'm now able to compile PadWinKeyb and it shows up in the lists. I think I will use it to port MegaPad, I only need to modify the PAD.c file (PAD.cpp) by copy-paste from my PAD.cpp file and remake the GUI with Glade. Last edited by NHervé; December 7th, 2007 at 16:43. Reason: Automerged Doublepost |
|
|
|
|
|
#118 (permalink) |
|
Plugin author
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jul 2007
Location: Nulle part
Posts: 413
|
when I compile PadWinKeyb with a different name ("MegaPad Plugin"), my plugin shows up in the lists. But when I add "#include <SDL/SDL.h>", the plugin does not work. I think I must add SDL into the compiler flags, by modifying the Makefile.
|
|
|
|
|
|
#119 (permalink) |
|
Registered User
Join Date: Feb 2007
Location: Terra Firma
Posts: 19
|
Something like:
SDL_CFLAGS := $(shell sdl-config --cflags) SDL_LDFLAGS := $(shell sdl-config --libs) CFLAGS+= $(shell pkg-config --cflags gtk+-2.0) ${SDL_CFLAGS} -D__LINUX__ CFGLIBS = $(shell pkg-config --libs gtk+-2.0) ${SDL_LDFLAGS} Instead of the current 2 lines about CFLAGS & CFGLIBS will probably work... |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|