MegaPad Plugin !!!

Discussion in 'PS2 Plugin Questions & Plugin Troubleshooting' started by Luigi__, Sep 25, 2007.

  1. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    Open the champagne !!! :D

    I've here a new pad plugin I wrote. It's MegaPad and it uses DirectInput. (the older versions use SDL)
    This plugin offers, as LilyPad, a complete pad support and many possibilities, but is much simpler than LilyPad.

    THE OLD VERSIONS (1.3.3 and older) AREN'T SUPPORTED ANYMORE !!!

    Launch PCSX2, open the plugin config dialog, and select MegaPad in the two Pad plugin lists. Click Configure under one of these lists, to open the GUI. Because you need to configure MegaPad. Here is the description of the GUI:

    - Pad 1 / Pad 2 tabs: allow to select which pad you want to configure.
    - Enable pad: uncheck it to disable the pad. It'll behave like the corresponding slot is empty. (Currently unsupported)
    - Enable force feedback (DualShock II): by unchecking it, you make the corresponding pad behave like a PSX DualShock pad (without force feedback). (Currently unsupported)
    - Logging: for debugging purposes only. The plugin writes all the events to a file.

    The 25 buttons in the frame labeled "Buttons" are for button mapping. Basically, you click one of these buttons, then:
    - if you want to bind it to a key, you press that key
    - if you want to bind it to a joystick button, you press that button
    - if you want to bind it to a joystick POV, you press that POV in the desired direction
    - if you want to bind it to a joystick axis, you move that axis in the desired direction (when doing so, the axis behaves like a pressure-sensitive button, to simulate the pressure stuff)

    The stuff in the frames labeled "Force feedback - Big/Small motor" isn't supported yet.



    Version 2.0.0 beta
    - Complete rewrite
    - SDL dropped; this version uses DirectInput instead
    - too much things to tell here...


    FAQ

    - I've downloaded version 1.x.x and it doesn't work/crashes/whatever
    THE LATEST VERSION IS 2.0.0 BETA
    THE OLDER VERSIONS ARE NOT SUPPORTED ANYMORE
    BECAUSE THEY ARE CRAP

    Did I say it loud enough?

    - I've downloaded version 2.x.x and it doesn't work/crashes/whatever
    If it crashes, tell me.
    If it doesn't recognize your joystick at all, try another joystick...
    If it recognizes your joystick but you can't use it ingame, try another pad plugin.

    - Where can I get a version for Linux?
    Nowhere. I don't know if there will ever be one.


    The version 2.0.0 beta is, as you already know, a beta. If you experience any problems using it, feel free to report them in this thread!
    But beta doesn't mean crashy or dangerous! Don't be afraid! It won't blow your computer!

    You can download the plugin in the attachments.
    Last edited: Mar 12, 2010
  2. NGEmu.com Advertisement

  3. refraction

    refraction PCSX2 Coder Contributors Award Winner!

    Messages:
    10,102
    Likes Received:
    19
    stickied :) good job
  4. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    thanks a lot
  5. ShadowCast

    ShadowCast New Member

    Messages:
    29
    Likes Received:
    0
    I have no clue on how to make the plugin work..i put the sdl in the root...but I'm not sure what to do next...
  6. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    Simply launch pcsx2, run Config and select MegaPad in the pad plugin lists.
  7. RPGW1ZaRD

    RPGW1ZaRD PCSX2 & O/C Addict

    Messages:
    2,841
    Likes Received:
    2
    A new plugin cool. :D

    Unfortunately it's not showing up in the config for me and in console it seems to complain something about line 126 in the MegaPad dll file. It's probably me missing some dll file.
  8. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    rpgwizard : put sdl.dll in the pcsx2 root folder. if it does not work put it in the "plugins" folder.
  9. paulsy

    paulsy and why shouldn't I

    Messages:
    305
    Likes Received:
    0
    is this windows only?
  10. RPGW1ZaRD

    RPGW1ZaRD PCSX2 & O/C Addict

    Messages:
    2,841
    Likes Received:
    2
    Lol yea sorry was tired and only had the sdl.dll file in plugins folder but putting it in the root pcsx2 folder new problems arise. Now it opens a similiar config window as SSSPSX pad has, far from what it looks like in the screenshots above when selecting megapad. lol

    When I choose configure it shows up a small window with title "PadwinKeyb Msg" and only says "-1 buttons" and this simplified SSSPSX pad plugin gui shows up as in screenshot below. :???:
    Last edited: Sep 27, 2007
  11. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    paulsy : yes it is windows only for the moment. Maybe it will be for linux later, I don't have linux. :(
    rpgwizard : i'm sorry i surely put one of my first builds. The dll in the zip was 27 kb heavy whereas the good dll is 632 kb heavy. :emb: :eyespin:

    I changed the attachments of the first post.
    Last edited: Sep 27, 2007
  12. Hard core Rikki

    Hard core Rikki Super Moderator Staff Member Award Winner!

    Messages:
    12,866
    Likes Received:
    298
    Way to go, Ngry ;)
    Putting fixed DLL and new versions in first post would give it more visibility.

    For Linux, trying with Ubuntu seems a fine idea.
    Free CD's+Free shipping too ;)
  13. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    hard core rikki : I put the good dll in the first post.

    I remember why I provided a wrong dll :
    I took the dll which was in the release folder, but I configured visual studio to build the dll directly in the plugins folder of pcsx2 a long time ago, so the dll in this folder was an old dll.

    I forgot to tell you
    the first time you launch the gui, you must select the axis sensitivity (blank because the ini file does not exist yet), click ok, close the plugin selection window and then re-launch the gui.
    I will work to solve this in the next version. I want to wait having at least 3-4 bugs in my bug report. I won't release a new version each time somebody tell me there is a bug, because Megapad is relatively young and could have many bugs I haven't noticed.
    Last edited: Sep 27, 2007
  14. refraction

    refraction PCSX2 Coder Contributors Award Winner!

    Messages:
    10,102
    Likes Received:
    19
    yeh anybody who gets this, its not line 126, its actually error 126 which means "missing DLL link file" aka, youve put SDL.dll a place it cant find it ;p

    if you wanna be doubly sure, stick it in your windows\system32 directory.
  15. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    Version 1.1.0

    Here is a new version of megapad with 2 little fixes :
    version 1.1.0
    The 2 problems were on the first launch of the plugin.
    -Axis sensitivity list was blank, now it is set on the default value "normal".
    -On the first launch config was not saved, now it is, you don't need anymore to re-launch the gui to get config saved. If you are interested by technical details, see bugreport.txt in the zip.

    For visibility reasons I put the attachment in the first post.
    Last edited: Sep 29, 2007
  16. mchomicz

    mchomicz New Member

    Messages:
    10
    Likes Received:
    0
    Would this be the plug-in to use with a game pad?

    Thanks for the plug-in. I just want to make sure I understand the purpose of it: would it be the sort of plug-in one would use to configure, say, a game pad like this one for use with PCXS2?

    Thank you,
    Michael
  17. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    Yes, I have myself a Logitech Cordless Rumblepad 2.
    My plugin supports up to 5 gamepads and, for each gamepad, all its buttons, 4 of its povs and all of its axes.
    This plugin supports mouse, keyboard and 5 gamepads !!!

    ps : my plugin does not support vibration yet, but the sdl does not support vibration yet too...
    When it will support vibration, I will try to implement it in my plugin.

    This plugin is here to make some rivalry to ssspsxpad. As I said in the first post, this plugin offers, as ssspsxpad, a complete pad support, except it has more options.
    As with ssspsxpad, you can :
    -use gamepads.
    -bind axes to buttons (i've implemented a feature : if you do this, this axis will be considered as a pressure-sensitive button, the axis value will be the pressure).
    -bind buttons to buttons.
    -bind axes to axes.
    -bind keys to buttons.
    Now i've implemented some features :
    -As said upper, the feature of axes and pressure-sensitive buttons.
    -Mouse support (based on the GS window, works better than padwinkeyb mouse support, but could not work very well, it's experimental and it was quite hard to implement), ssspsxpad does not allow you to map another thing than axes to axes, so if you want to use the analogs with ssspsxpad you must have a gamepad, with padwinkeyb you can only use joystick buttons. With my plugin press any key while mapping an axis and the mouse will be bound to the selected axis.
    -Some options:
    -Axis sensitivity for the joystick axes.
    -Logging (for debugging purposes)
    -Always show cursor, so you can see the cursor with ZeroGS.
    -Low-visibility cross cursor, so you don't have to see the arrow cursor.
    Last edited: Sep 29, 2007
  18. RPGW1ZaRD

    RPGW1ZaRD PCSX2 & O/C Addict

    Messages:
    2,841
    Likes Received:
    2
    Found a problem, it's only allowing 1 direction key at the moment to be pressed so you can't get those smooth movements which is crucial for enjoyable gaming. So you cannot first press down and then press down and right after and then release down button to move in right direction for example. With this plugin it won't work.

    Also I noticed switching save states would switch it 2 steps when both pad1 and pad2 are selected as megapad, an option to "disable pad2" within the plugin would be good.
  19. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    Okay, if you really want to bind directional keys or numpad to analogs, i will implement it in the next version.

    If you want to disable pad 2 in megapad, simply select another plugin for pad 2.
    I think it will be implemented in the next version too.

    ps : your "problem" is not a problem : there are 2 direction per axis :
    X : horizontal
    Y : vertical
    You can bind them to the Mouse or to a joystick axis.
    Last edited: Sep 30, 2007
  20. RPGW1ZaRD

    RPGW1ZaRD PCSX2 & O/C Addict

    Messages:
    2,841
    Likes Received:
    2
    Yeah I knew you would reply with that lol. But I'm a keyboard user and for us it's a problem. :) But I thought at least D-pad movement would have to behave in that way as even the ps2 controller on a real ps2 controller would be able to do that what I specified as a problem.

    But it's up to you of course how "univeral" you want to make this plugin, there are already TwinPad and Lilypad which are excellent for us keyboard users. Lilypad also has pad/joystick support if I'm not mistaken but TwinPad is purely made only for keyboard users. So of course you can choose this plugin to be targeted for pad users, it's just matter of which aproach you decide to go and how much time you want to spend onto it.
    Last edited: Sep 30, 2007
  21. Luigi__

    Luigi__ Formerly NHervé Emu Author

    Messages:
    821
    Likes Received:
    6
    Okay, it will be implemented in the next version.
    Also, I always though play PS2 games with a keyboard would be masochism.

    I prefer play with a gamepad. Everyone play as he wants !
    Last edited: Sep 30, 2007

Share This Page