Emuforums.com

Go Back   Emuforums.com > PS2 Emulation > PS2 Plugin Questions & Troubleshooting
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Login to remove all ads!
Reply
 
LinkBack Thread Tools Display Modes
Old March 25th, 2007   #1 (permalink)
ChickenLiver
LilyPad Author
 
Join Date: Apr 2006
Location: Perdition
Posts: 395
LilyPad 0.9.1 - once new pad plugin with a lame name and excessive documentation

LilyPad 0.9.1 is a Windows pad plugin. If you run into any bugs or have any suggestions, I'm open to ideas. I'll update this post and bump the thread when I release new versions. Changelog included in rar. 0.9.1 adds a fix for getting/releasing mouse focus and an improvement to the save/load stuff. 0.9.0 adds a work around for an issue with some buggy force feedback drivers. It also adds the ability to load/save configurations in other files and support for guitars (See bottom). No other major changes. The rather messy C++ source is available as well. I'm not terribly concerned about it, but consider it licensed under GPL version 2.

A quick list of the features: Keyboards/Mice/Direct Input devices are all supported. It supports multiple devices of all types, and devices of different types can be mixed and matched. Sensitivity can be adjusted. Force feedback is supported. Multiple keys/buttons/axes can be bound to the same PS2 button, and one key/button/axis can be bound to multiple PS2 buttons. Keys can be mapped to the analog sticks. Axes can be mapped to fake Lx/Rx axes. Pressure sensitive buttons and other single-direction axes (Like foot peddles) are also supported. Screenshots and LilyPad itself are at the bottom of the post.

LilyPad Documentation

Troubleshooting
As discussed below, to bind a d-pad or joystick of any type, use the bind horizontal/vertical axis buttons rather than the individual direction buttons.

If you experience delayed response to input, make sure PCSX2's priority is set to normal or lower.

If having trouble with the keyboard or mouse, try changing modes. DirectInput has been the most heavily tested and raw input the least. I'd recommend you just stick with DirectInput unless you run into any issues.

If you have trouble getting some of the buttons on your gamepad/whatever working, try rebooting (If you haven't rebooted since installing the device). A number of people have reported that this resolves some problems.

Also, if you run into any trouble, make sure you've installed any software that comes with your game pads. Even if the pad partially/mostly works without the drivers, force feedback, for example, may well require the drivers be installed.

More generally, if you have trouble with several plugins not being detected by PCSX2 at all, try setting your plugins directory in the configuration screen, even if it appears to already be set correctly (Suggestion from WhoShotYa).

If you have an issue with a controller, first make sure you can see it under "DirectInput Device Diagnostics". If it's not there, probably nothing I can do. Make sure "Game Devices" are set to "Direct Input". If it is listed, double click it and see if the object(s) you're having trouble with are listed and being read correctly. Tell me if they are and give as complete a description of your issue as possible: Device type, device control that has issues (d-pad, button, pressure sensitive button, axis, etc), if you can't bind the control or if the problem is only in game, etc.

Logging is generally only useful if you only have issues with one game and everything else works fine. In these cases a blockdump would be best for me, but logs are also useful. Simplest not to bother unless I ask for it.

Basic Control Configuration
The input mode sets the Microsoft input API LilyPad uses to read input. Mice and keyboards both have 4 input modes. The modes are: Windows messaging, raw, DirectInput, and disabled. DirectInput is the recommended mode, though any mode except disabled should be fine for most people. You must set a keyboard mode other than disabled if you want PCSX2/GS hotkeys to work.

Raw mode distinguishes between multiple keyboards/mice under XP/Vista, but does not support horizontal mouse wheels and won't distinguish between right/left control/shift/alt keys (And doesn't work under w2k and w9x). DirectInput mode is poll-based while the other two methods are pushed-based. DirectInput mode is the most compatible (especially if everything is set to either DirectInput or disabled and the hacks are all disabled). Only DirectInput provides support for more than 5 buttons on a mouse.

Other devices (Game devices, certain extended keyboard keys, etc) are only available through DirectInput.

To configure bindings, first you need to set a mode for keyboards/mice/other devices. Then just go to the tab for the appropriate pad. If you switch input modes after binding keys, the bindings for the old input mode will be hidden, but will reappear if you switch back. Direct Input devices have a prefix of "DX" ("DI" looks odd), raw devices are just followed by a number ("Mouse 1", "Keyboard 1", etc), and Windows messaging devices are prefixed by "WM". DirectInput devices with configured controls that are not currently plugged in are called "Lost DX Device #". You need to press refresh on the first page when you plug devices back in for their name to be displayed properly. Press the button corresponding to the button/axis you want to bind, and then press the button/jiggle the axis you want to bind it to. Bindings are sorted first by device, then by PS2 button/axis, and finally by object type and id.

You can adjust the sensitivity or flip axes by selecting a bound axis and using the slider and button to the lower right. Sensitivity determines the pressure sent for the sticks in dual shock mode, and whether or not a key is considered "down" for the digital portion of the controller state. I'm not sure how the actual dual shock works, but I currently only say a key is down when dual shock pressure is at 50% of maximum or more. What the default sensitivity value of "1.000" means depends on the device itself. The default is high enough that relative axes (Which are primarily used by mice) are generally either considered fully up or down. For absolute axes (And force feedback devices), which are used by most game devices, a value of 1.0 should map the device's extreme values to the extreme values of a stick/pad.

For all 3 vertical axes, down is positive and up is negative. This agrees with windows screen coordinates, and mice and joysticks generally work as expected if you bind vertical to vertical. For some other axis types, however, this may result in flipping up/down. In particular, if you bind a mouse wheel to a vertical axis, you'll need to flip the axis for mouse wheel down to act like down.

To map a POV slider (Better known as a "hat". They are objects that only provide a direction. D-pads are hats on many pad controllers), press an axis button and move the slider in the direction you want to bind to it. Binding one direction to a d-pad/analog stick axis will automatically bind the other direction to the perpendicular axis. As POV objects only report a direction, they have no sensitivity; however, their axes can be flipped independently. Each POV object can only be bound once, so if you bind one to Lx/Rx, up and down will do nothing.

To configure force feedback, select the device and axis/axes in the pulldown menu you want to bind. I number the axes starting from 1 instead of giving their string names because of space constraints. They are generally sorted x, y, and then z. The second pulldown sets the functions used for the effect. This is only for funky devices that associate different functions with different motors, as all functions are configured so they're effectively constant. The "sensitivity" sets the force used when an effect is triggered. The default sensitivity maps the maximum PS2 vibration to the maximum Direct Input vibration. Flip flips the direction of the effect axis. This most likely will have no noticeable effect. Once a force feedback axis is configured (As in bound and selected in the list of bound controls, not selected in the drop down menu), you can click "Test FF" and the axis will then vibrate at the maximum possible value a game can set it to. Note that the small motor is only either off or on at max, while the big motor's vibration can be set from 0 to 255.

To bind a pressure-sensitive button or other single-direction axis to a button, select the "Allow binding axes to buttons" option under DirectInput on the first page. It theoretically lets you bind any absolute axis to any button, which is why it has its own section, though mice and keyboards rarely (Never?) have absolute axes. If you so desire, once you've bound the axis to a button, you can disable the option and bindings it was used to create will remain. Also note that this will not work for toggle buttons, which have special handling. The analog button, the "lock" buttons, and the "mouse" button are all toggles.


Special button bindings
The "Mouse" button lets you bind a key to pad 1 or pad 2 that releases the mouse. This makes the cursor visible and lets you move/resize the emulator window. Alt-tabbing to another application also makes the cursor visible, but focusing the emulation window hides it again. Note that though the binding appears on the page of a particular pad, pressing the button affects all mice.

The "Lock Input" button locks the current state of the pad. Any further input is handled normally, but the initial pad state is the locked state instead of a state with no buttons pressed. Pressing it again releases the old pad state, if the old pad state had any keys pressed. Otherwise, it's released automatically.

"Lock Direction" does the same thing, except it only applies to the d-pad and analog sticks. Pressing this when all input is locked unlocks only the pad and sticks. Pressing it again will lock them again, keeping the buttons locked. "Lock buttons" does the same thing, only with the opposite set of controls.

Pressing "Lock Input" when only half the input is locked (directions or buttons) will lock the other half, leaving the already locked half still locked, and in its old locked state.

The "ignore key" button both attempts to block the specific key(s) you give it and does not pass them on to PCSX2. It currently cannot block the windows key (I'm not sure why). It was implemented primarily to prevent passing F7 to the GS plugin, which I occasionally hit when playing with graphics options and can cause PCSX2 to crash. Ignored keys are listed with pad 1's bindings. If an ignored key is also bound to a command, the command may or may not be triggered. The ignore button works like most of the other buttons: Press it and then the key to be ignored. You do not have to configure ignored keys again when you change the keyboard input mode.


Other options
All the options under "Hacks" are a bit hackish, and may not work with all graphics plugins or emulators (PSX emulators, in particular). I do almost all my testing with ZeroGS. That having been said, the worst that can result from using them is an emulator crash (Not a system crash) when starting/stopping the emulator. Shouldn't cause any issues in game, and crashing behavior should be consistent (Either always does or never does).

"Send escape on window close" sends an escape message instead of closing the window when you try and close the graphics windows. This prevents bad things from happening when you try and close the GS plugin window. After the first attempt to close the window, however, PCSX2 closes the pad plugin. As a result, attempting to close the window while the emulator is not actively running still isn't a great idea.

"Close emulator on window close" kills the emulator instead. I don't recommend this, as I'm not sure how well everything cleans up after itself when you do this.

"Disable Screensaver" will disable the screensaver (And entering low power monitor mode) when the emulation window is in the foreground. This is primarily intended for people using neither mouse nor keyboard, as game device input does not prevent the screensaver from popping up.

"Start in analog mode" starts a pad in analog mode, and after a game initializes the pad, attempts to switch the pad to analog mode as well. This is handy for the lazy, who don't want to have to hit the analog button whenever they start the emulator for games that support but do not automatically enable analog mode, and for loading states in games that get upset when you load a state before the pad is initialized. May theoretically cause issues with some games, especially very old ones.

"Allow multiple binding" allows one DirectInput control to be bound to multiple commands. One control can be bound to commands on both pads as well. The sensitivity of each force feedback axis can be set independently as well, by binding them independently.

"Start without mouse focus" starts the plugin without stealing the mouse focus and hiding the cursor. Mainly useful for people who only occasionally use the mouse. Equivalent to just pressing the mouse button whenever you start the emulator.

"Refresh" will update the list of DirectInput devices. Double clicking a DirectInput device or selecting "Test Device" will display a continuously updated list of the state of all objects on the selected device. DirectInput devices not currently enabled in the mode selection list at the top are not displayed.

Notes
As with all pad plugins, you should set both the pad1 and pad2 plugins to LilyPad so LilyPad doesn't fight with another plugin for control of user input devices. If you really need to use two different pad plugins for some reason, and one is LilyPad, disable LilyPad's keyboard handling so that the F-keys, used to control the emulator, don't behave as if you always press them twice.

For the 64-bit build, you'll need the latest version of the MSVC 8.0 runtime. Not sure how many people running XP64/Vista 64 don't have this. If LilyPad fails to load and gives some sort of message about the software version or tells you to reinstall something, you'll need to install the runtime. Otherwise, you already have it. The 32-bit build was built with MSVC 6.0, so doesn't require anything special.

Some PSX emulators (At least PSXeven) require pad plugins to be named pad*.dll. To use LilyPad with those, you'll have to rename the dll. The most popular two psx emulators don't use pad plugins and LilyPad is really aimed at use with PCSX2, anyways, so I'm not going to rename the dll, to minimize confusion.


Guitars
To make a pad work as a guitar in Guitar Hero or Rock Band, select the Guitar checkbox for that device and rebind the controls. Note that you must start the game with the checkbox selected. Toggling it later won't work. For the Xbox 360 guitars, tilting apparently acts like a button, while it's a button on the PS2 guitar (Needs verification - could actually be right stick vertical or something. At the moment, LilyPad binds it to select). For this reason, allow pressure sensitive buttons is forced on when either pad is in guitar mode, so I don't have to answer the same question 50 times. Also, you may need to flip the whammy bar.

Guitar Hero 2 has some sort of additional check to prevent the use of 3rd party guitars. I don't know how to convince it I'm a real guitar. As a workaround, there's a GH2 hack option in the hacks section. Check it and the pad's guitar setting to play GH2 with a guitar. You'll have to press the strumbar and the frets at the same time to navigate through menus. This is a result of the GH2 hack causing the guitar to identify itself as a pad, but behave more like a guitar in-game. There's no reasonable workaround I can do for this, unless I learn how to convince GH2 I'm really a guitar. A PCSX2 patch file might be possible, however.

Particular thanks to cottonvibes for info on the PS2 guitar. Also thanks to (In alphabetical order) bitterSTAR, Knaiffi, lazyk, and silent-circuit for additional information and testing. Sorry if I left anyone out.


Think that's about it. Feel free to redistribute the plugin however you like. Screenshots are of an older version.
Attached Images
File Type: png LilyPad.png (16.5 KB, 752 views)
File Type: png LilyPad2.png (20.7 KB, 847 views)
Attached Files
File Type: zip LilyPad 0.7.1.zip (68.6 KB, 637 views)
File Type: rar LilyPad 0.8.2.rar (64.7 KB, 255 views)
File Type: rar LilyPad 0.8.3.rar (66.3 KB, 395 views)
File Type: rar LilyPad 0.8.4.rar (66.3 KB, 3324 views)
File Type: rar LilyPad 0.8.4 source.rar (62.3 KB, 276 views)
File Type: rar LilyPad 0.9.0.rar (69.0 KB, 296 views)
File Type: rar LilyPad 0.9.1 source.rar (50.5 KB, 52 views)
File Type: rar LilyPad 0.9.1.rar (69.5 KB, 1255 views)

Last edited by ChickenLiver; 22 Hours Ago at 15:31.
ChickenLiver is offline   Reply With Quote
Old April 3rd, 2007   #2 (permalink)
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,282
im sticking this, hopefully you will get some good feedback for it, if its any good, we will put it up for download on the official site
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), eVGA 8800GTX 768mb, 996Gb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel, 14605 3dMark 06 Points
CPU-Z Link
3dMark06 Score Link
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old April 3rd, 2007   #3 (permalink)
ChickenLiver
LilyPad Author
 
Join Date: Apr 2006
Location: Perdition
Posts: 395
Thanks, appreciate it.
ChickenLiver is offline   Reply With Quote
Old April 9th, 2007   #4 (permalink)
MrLavender
Registered User
 
MrLavender's Avatar
 
Join Date: Aug 2002
Location: UK
Posts: 88
Configuration doesn't correctly recognise some of the buttons on my controller. I press the button to assign it and it is picked up as an axis...

In the screenshot below what is shown as x/y/z axis should be buttons 0,1,2, z rotation is button 5.

It *does* correctly recognize the right and left analog stick axes as x/y/z/z rotation though...

I'm using a ps2 dualshock controller on a usb converter. Works fine in other games and on the windows game controllers properties page. No drivers loaded, windows just picks it up automatically as 4 axis 16 button HID-compliant game controller.
Attached Images
File Type: jpg lilypad_config.jpg (73.5 KB, 295 views)
__________________
Asus P5B-Deluxe, E6600 @ 3.2 GHz, Nvidia 8800GTS 640MB, 2GB Corsair XMS2-6400C4, WinXP Pro SP2
MrLavender is offline   Reply With Quote
Old April 9th, 2007   #5 (permalink)
ChickenLiver
LilyPad Author
 
Join Date: Apr 2006
Location: Perdition
Posts: 395
Hmm...That's funky. Are only the labels incorrect? That is, even with the wrong labels, does it still work? LilyPad won't let you bind axes to buttons, so despite the labels, looks like they're all correctly being detected as buttons. Those strings come from Direct Input; I don't generate them myself. If they don't work, could you please tell me which buttons do work (none/only properly labelled ones/etc)?

Another possibility: If you bind controls, then start running the emulator, then escape out, and then bind some more, bad things may happen. I don't think this will cause problems, but it might. If you didn't do that, this is obviously not the issue. If this is the issue, delete all your bindings, restart PCSX2, and rebind everything.

Alternatively, it could be some other issue I'm not thinking about...If this is the case, the buttons don't work correctly when pressed and possibility 2 isn't the issue. If this is the case, I've attached a special version of the dll. Put it in your plugins directory and it will create a file called debug.txt in the PCSX2 directory (You shouldn't have to do anything, just go to the plugin selection screen. I don't think you even have to select the plugin). Compress it and post it here. It just contains a list of all direct input devices, all their buttons/axes/etc, their names, and their types. It will clearly indicate if my first guess is correct, and if it's not, it'll at least give me a better idea of just where things are going wrong.

Edit: Do try the debug dll. It suddenly occurred to me that buttons and axes may be using the same object ids. The dll's output would let me verify that. As I record settings only by object id, and not by type, this would cause issues. I didn't think that sharing ids was permitted when I wrote my code, but it would explain exactly the behavior you're seeing (First 3 axes and first 3 buttons being confused. Not sure why the other one skips two buttons). If this is the case, should be an easy fix, though I'd like to verify it is before trying to fix it.

<Attachment removed, version in first post is more recent>

Last edited by ChickenLiver; 3 Weeks Ago at 17:10. Reason: ancient typo I just noticed
ChickenLiver is offline   Reply With Quote
Old April 9th, 2007   #6 (permalink)
MrLavender
Registered User
 
MrLavender's Avatar
 
Join Date: Aug 2002
Location: UK
Posts: 88
Quote:
Originally Posted by ChickenLiver View Post
Edit: Do try the debug dll. It suddenly occurred to me that buttons and axes may be using the same object ids. The dll's output would let me verify that. As I record settings only by object id, and not by type, this would cause issues. I didn't think this sharind ids was permitted when I wrote my code, but it would explain exactly the behavior you're seeing (First 3 axes and first 3 buttons being confused. Not sure why the other one skips two buttons). If this is the case, should be an easy fix, though I'd like to verify it is before trying to fix it.
Yes, it looks to me like that is what is happening.

Thanks for the quick response Looking forward to being able to use my controller in this emulator (the SSSPSXPad doesn't see it all, I suspect that plugin is only looking at the first device it finds, which is a Saitek command pad on my system).

Code:
Device: 4 axis 16 button joystick
Object 0: Button 0 (Push button)
Object 1: Button 1 (Push button)
Object 2: Button 2 (Push button)
Object 3: Button 3 (Push button)
Object 4: Button 4 (Push button)
Object 5: Button 5 (Push button)
Object 6: Button 6 (Push button)
Object 7: Button 7 (Push button)
Object 8: Button 8 (Push button)
Object 9: Button 9 (Push button)
Object 10: Button 10 (Push button)
Object 11: Button 11 (Push button)
Object 12: Button 12 (Push button)
Object 13: Button 13 (Push button)
Object 14: Button 14 (Push button)
Object 15: Button 15 (Push button)
Object 1: Y Axis (Absolute axis)
Object 0: X Axis (Absolute axis)
Object 5: Z Rotation (Absolute axis)
Object 2: Z Axis (Absolute axis)
Object 0: Collection 0 - Joystick
Object 1: Collection 1 - Pointer
Attached Files
File Type: zip debug.zip (1.7 KB, 90 views)
__________________
Asus P5B-Deluxe, E6600 @ 3.2 GHz, Nvidia 8800GTS 640MB, 2GB Corsair XMS2-6400C4, WinXP Pro SP2
MrLavender is offline   Reply With Quote
Old April 9th, 2007   #7 (permalink)
cyclonmaster
EmuAddict-_-;;
 
cyclonmaster's Avatar
 
Join Date: Apr 2005
Location: Sarawak, Malaysia
Posts: 2,209
Oh... I miss this one. Thanks
__________________
Windows XP SP2 | Monitor BenQ FP 91G+|AMD Athlon 64 3000+(9x239=2.145GHz) | Corsairs 512MB RAM 3-3-3-8 Dual Channel
Albatron 6600GT 128MB PCI-E | Albatron KXT890 ProII | WD SATA 120GB | SONY DVDRW DW-Q30A
cyclonmaster is offline   Reply With Quote
Old April 9th, 2007   #8 (permalink)
RPGW1ZaRD
PCSX2 & O/C Addict
 
RPGW1ZaRD's Avatar
 
Join Date: Mar 2006
Location: My Computer
Posts: 2,660
Woah, just noticed this plugin, seems like another "TwinPad" plugin which is nice for keyboard users. Definitely gonna test this one.

Too bad you can't use mouse and keyboard inputs at same time, otherwise I had really loved this plugin.

Quote:
Originally Posted by refraction View Post
im sticking this, hopefully you will get some good feedback for it, if its any good, we will put it up for download on the official site
Why don't you ever put TwinPad plugin for dl there too. :/
__________________

« Feel free to browse through PCSX2 screenshots on RPGWiZaRD's Putfile.com section »

Intel® Core™2 Duo E8400 @ 4.0GHz «-» Abit IP35 Pro «-» Team Xtreem 2x1GB @ DDR2-1000 4-4-4-8 «-» JetWay 8800GT 512 MB @ 715/1750/1030 MHz «-» Thermaltake ToughPower 750W «-» Sony Multiscan G400 19" CRT «-» Tuniq Tower 120 «-» Creative SoundBlaster Audigy «-» Logitech X-530 5.1 «-» Logitech MX-510 «-» Windows XP Pro SP3

Last edited by RPGW1ZaRD; April 9th, 2007 at 08:58.
RPGW1ZaRD is offline   Reply With Quote
Old April 9th, 2007   #9 (permalink)
ChickenLiver
LilyPad Author
 
Join Date: Apr 2006
Location: Perdition
Posts: 395
You can indeed use the keyboard, mice, and other devices at the same time.

How did you get the impression you couldn't?

MrLavender: Please tell me if the new version fixes the issue you ran into.

Last edited by ChickenLiver; April 9th, 2007 at 09:35. Reason: Automerged Doublepost
ChickenLiver is offline   Reply With Quote
Old April 9th, 2007   #10 (permalink)
RPGW1ZaRD
PCSX2 & O/C Addict
 
RPGW1ZaRD's Avatar
 
Join Date: Mar 2006
Location: My Computer
Posts: 2,660
Quote:
Originally Posted by ChickenLiver View Post
You can indeed use the keyboard, mice, and other devices at the same time.

How did you get the impression you couldn't?
Nvm, obviously you had to choose direct input and another device for mice when configuring controls as otherwise it won't let u specify the keys and once u done that I put both to direct input and it started working ingame too.

Damn nice work, I've waited for a plugin that lets you specify also sensitivity for x and y-axis for mouse analog control, this way you can adjust it for every game so it becomes just the way you want it to be.

Even aiming in Resident Evil 4 with mouse works perfectly.

What differs TwinPad and this plugin in mouse analog controlment is that with this plugin you need to keep moving the mouse all the time to a direction while with TwinPad you could just move it once to a direction and keep it there and the character keeps going in that direction which is kinda comfortable IMO. That's like the only downside I can think of about this plugin, otherwise I really like it.
__________________

« Feel free to browse through PCSX2 screenshots on RPGWiZaRD's Putfile.com section »

Intel® Core™2 Duo E8400 @ 4.0GHz «-» Abit IP35 Pro «-» Team Xtreem 2x1GB @ DDR2-1000 4-4-4-8 «-» JetWay 8800GT 512 MB @ 715/1750/1030 MHz «-» Thermaltake ToughPower 750W «-» Sony Multiscan G400 19" CRT «-» Tuniq Tower 120 «-» Creative SoundBlaster Audigy «-» Logitech X-530 5.1 «-» Logitech MX-510 «-» Windows XP Pro SP3

Last edited by RPGW1ZaRD; April 9th, 2007 at 10:20.
RPGW1ZaRD is offline   Reply With Quote
Old April 9th, 2007   #11 (permalink)
ChickenLiver
LilyPad Author
 
Join Date: Apr 2006
Location: Perdition
Posts: 395
TwinPad's implementation of mouse/analog stick mapping does work well for movement (On a random side note, just glanced at its code, and how it does it is really cool. Not something I would have come up with. Maybe I'll release my code at some point, though it's a complete mess)...I tend to be happiest moving with a keyboard. Don't think there's any way for me to do something too similar without doing something very hackish, as my direct input code, in particular, doesn't even know what a mouse is. My Direct Input code, by design, treats all axes identically. It doesn't know what an x- or y-axis is, or what a mouse wheel is. I simply enumerate all the axes for a device, and then treat them all the same, basically. The only place the mouse identifier affects anything is when it's deciding which devices it wants input from. This makes setting up bindings to toggle how to interpret a given axis on a given device rather nasty.

One thing I could do, and that I've been considering, however, is a "state lock" button. When you press it, it saves the current input state and acts like all buttons continue to be held down (Even when released), until state lock is pressed again. I could even get fancy and let you press more buttons in the meantime. Only problem with that is that analog pressure would be doubled when you enable it, until you release whatever's bound to analog devices. One nice thing about this is it fits in very well with my current architecture, so would be pretty simple to implement. Could also make a "direction lock" button that does the same thing, except it only applies to the d-pad and the analog sticks...Could be a handy feature. I take advantage of LilyPad locking input state when I unfocus the window on occasion, myself.

Edit: This wouldn't work nearly as well with a mouse as what TwinPad does, now that I think about it...more intended to be used when using the keyboard (or joystick) to move. Still could be useful, though.

Last edited by ChickenLiver; April 9th, 2007 at 14:45.
ChickenLiver is offline   Reply With Quote
Old April 9th, 2007   #12 (permalink)
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,282
Quote:
Originally Posted by RPGW1ZaRD View Post

Why don't you ever put TwinPad plugin for dl there too. :/
we will put them both up, twinpad is obviously working well, it is already linked in the FAQ on the forum, so its a start
__________________

http://www.generalemu.net/
Intel Core 2 Quad Q6600 @ 3.4Ghz (425x8), eVGA 8800GTX 768mb, 996Gb HDs, 2Gb Corsair DDR2-800 @ DDR2-1020 5-5-5-18 Dual Channel, 14605 3dMark 06 Points
CPU-Z Link
3dMark06 Score Link
Dont PM me for help, use the forums, thats what its for!



refraction is offline   Reply With Quote
Old April 9th, 2007   #13 (permalink)
MrLavender
Registered User
 
MrLavender's Avatar
 
Join Date: Aug 2002
Location: UK
Posts: 88
Quote:
Originally Posted by ChickenLiver View Post
MrLavender: Please tell me if the new version fixes the issue you ran into.
It doesn't

It now shows the configuration correctly in the setup dialog when I first define it, but when I exit the dialog and then open it again it has lost the "conflicting" IDs.

If I define all the buttons first then it remembers those but loses the x/y/z/z rotation axes.

If I define the axes before the buttons then it remembers those but loses buttons 0,1,2,5.

I'm looking at the .ini file changing while entering and exiting the configuration dialog, and it seems to be picking up only the first object listed there if there are two with the same ID.

Buttons 0,1,2,5 are not working in the emulator whatever I do. Even if I just setup the 16 buttons and assign analog sticks to the keyboard, so there are no ID conflicts, those buttons don't work in-game.

My .ini file attached, hope that helps.
Attached Files
File Type: txt LilyPad.ini.txt (976 Bytes, 84 views)
__________________
Asus P5B-Deluxe, E6600 @ 3.2 GHz, Nvidia 8800GTS 640MB, 2GB Corsair XMS2-6400C4, WinXP Pro SP2
MrLavender is offline   Reply With Quote
Old April 9th, 2007   #14 (permalink)
ChickenLiver
LilyPad Author
 
Join Date: Apr 2006
Location: Perdition
Posts: 395
Thanks for the detailed description of just what's going on, and the ini. Made finding both issues pretty easy. I've found both bugs and fixed them, so hopefully it will work now. Try the attached version (As I'm not sure it'll work and I changed nothing else, not going to make it an "official" release until it's been tested).

Edit: Also, just out of curiosity, do you need to invert the vertical axes for them to work correctly?

<Attachment removed>

Last edited by ChickenLiver; April 10th, 2007 at 05:45.
ChickenLiver is offline   Reply With Quote
Old April 10th, 2007   #15 (permalink)
MrLavender
Registered User
 
MrLavender's Avatar
 
Join Date: Aug 2002
Location: UK
Posts: 88
This version is working perfectly, thank you

And no, I don't need to invert the vertical axes, everything works as expected.
__________________
Asus P5B-Deluxe, E6600 @ 3.2 GHz, Nvidia 8800GTS 640MB, 2GB Corsair XMS2-6400C4, WinXP Pro SP2
MrLavender is offline   Reply With Quote
Old April 10th, 2007   #16 (permalink)
ChickenLiver
LilyPad Author
 
Join Date: Apr 2006
Location: Perdition
Posts: 395
Great. Glad to hear it.

New release -> bump (bolden?) whatever...More additions than just those bug fixes.

The lock input buttons are complete hacks...Tell me if you (meaning anyone) run into any problems with them.
ChickenLiver is offline   Reply With Quote