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 September 25th, 2007   #1 (permalink)
NHervé
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 310
Talking MegaPad Plugin !!!

Open the champagne !!!

I've here a new pad plugin I wrote. It's MegaPad and it uses SDL. No worry, the latest actual version of the SDL (1.2.12) is provided.
This plugin offers, as LilyPad, a complete pad support, many possibilities, but is much simpler than LilyPad.

First place SDL.dll in the root PCSX2 folder (not the plugins folder), else the plugin won't start.

1. Mapping and config

After having selected MegaPad in the Pad plugins list and launched its GUI by clicking the
Config button, you must configure it. You can select the Pad 1 or the Pad 2 with the
buttons in the top-left corner of the window. For mapping press any of the 20 buttons.
The pressed button will become grayed. Then you can do various things :

a. Keyboard

For the buttons press a key and the selected button will be bound to the pressed key. Pressing
Escape or Backspace allows you to delete a value. For the axes press any key with old versions, or click right button whth new versions, and the selected
axis will be bound to the mouse. Note that if the axes of the 2 players are bound to the mouse,
they will move simultaneously.

b. Joystick

For the buttons press a button, a POV hat in the wanted direction or move an axis in the wanted
direction and it will be bound to the selected button. Note that if you bind an axis to a
pressure-sensitive button*, the pressure will match the value of the axis. Try this feature in
games which need pressure sensitive buttons. For the axes move an axis and it will be bound to
the selected axis. Warning : the GUI has a little difficulty to detect the moves of the vertical
(y) axes, but there is no problem in the games.

c. Misc

There are 4 general options under the mapping buttons.
1. Axis sensitivity : can be 3 values (affect the GUI as the games). This is the sensitivity of the
plugin to axis moves.
-Very sensible : for precision games or low-sensibility axes.
-Normal : default, I recommend you to use it.
-Low sensibility : use it if your axes are very sensible.
2. Enable logging : This enables a pad log stored in logs\megapad_log.txt, which can be used only for
debugging purposes. As mentionned, this logging makes the emu slower.
3. Always show cursor : Use it with ZeroGS if you use the mouse, to see where is the cursor.
4. Low-visibility cross cursor : The arrow cursor is replaced by a low-visibility cross cursor.
Use it if you don't want to see the arrow cursor.

Then click OK.

2. Emu

I think I don't need to detail how to use the keyboard or the joysticks, but I will tell you how does
the mouse support work.
Press the left button for left axis, the right button for right axis. When you release a button, the
corresponding axis will be "centered". When you press a button the cursor is automatically centered.
Move it as an analog axis. When a button is pressed the cursor cannot get out the GS window. The
mouse support has been seriously improved in the new version, axis positions are calculated from
the size of the GS window, so it works better than PadWinKeyb mouse support.

If you encounter any bug using this plugin tell it to me.

The plugin is in the attachments, with screenshots of the GUI.
Sorry I changed the attachments because I provided a wrong dll.

Version 1.1.0

I released a new version with 2 little fixes. It is in the attachment.
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.

Version 1.2.0

See readme.txt to know exactly what has been implemented.
You will need to re-map your buttons because of a changed config system.
You can bind keys to analogs, and when, for example, you press Up, the character goes up, you press Down while pressing Up, the character goes down, you release Down, the character goes up. In TwinPad topic, some guys asked for it.

Version 1.3.0

F keys work now, thanks RpgWizard for signaling me this bug, the GUI does not allow you to bind them to any control, and if the input detection loop detects that a F key has been pressed it directly returns.

Version 1.3.1

Fixed a bug with the axes.

Version 1.3.2

For those who get a bug while mapping the buttons, download this version.

Version 1.3.3

The bug on first launch was because PCSX2 does not call PADinit on first launch ("pcsx2 needs to be configured" message), and SDL init is in PADinit. So if PADinit hasn't been called by PCSX2 it is called by the GUI. So the bug that version 1.3.2 was supposed to fix is really fixed here.

NHervé.
Attached Images
File Type: jpg megapad1.JPG (66.7 KB, 589 views)
File Type: jpg megapad2.JPG (121.4 KB, 806 views)
File Type: jpg megapad1.2.0.JPG (71.0 KB, 487 views)
Attached Files
File Type: zip MegaPad_ver1.0.0.zip (992.5 KB, 775 views)
File Type: zip MegaPad_ver1.1.0.zip (991.4 KB, 376 views)
File Type: zip MegaPad_ver1.2.0.zip (759.1 KB, 229 views)
File Type: zip MegaPad_ver1.3.0.zip (758.3 KB, 441 views)
File Type: zip MegaPad_ver1.3.1.zip (609.6 KB, 383 views)
File Type: zip MegaPad_ver1.3.2.zip (611.4 KB, 642 views)
File Type: zip MegaPad_ver1.3.3.zip (609.8 KB, 3624 views)

Last edited by NHervé; November 15th, 2007 at 18:05. Reason: New version 1.3.3
NHervé is offline   Reply With Quote
Old September 25th, 2007   #2 (permalink)
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,215
stickied good job
__________________

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 online now   Reply With Quote
Old September 25th, 2007   #3 (permalink)
NHervé
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 310
thanks a lot
NHervé is offline   Reply With Quote
Old September 25th, 2007   #4 (permalink)
ShadowCast
Registered User
 
ShadowCast's Avatar
 
Join Date: Jan 2006
Location: Croatia
Posts: 29
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...
__________________
*Signature pic over size limits of 500x130 and no larger than 25K in size*
ShadowCast is offline   Reply With Quote
Old September 26th, 2007   #5 (permalink)
NHervé
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 310
Simply launch pcsx2, run Config and select MegaPad in the pad plugin lists.
NHervé is offline   Reply With Quote
Old September 26th, 2007   #6 (permalink)
RPGW1ZaRD
PCSX2 & O/C Addict
 
RPGW1ZaRD's Avatar
 
Join Date: Mar 2006
Location: My Computer
Posts: 2,655
A new plugin cool.

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.
__________________

« 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
RPGW1ZaRD is offline   Reply With Quote
Old September 26th, 2007   #7 (permalink)
NHervé
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 310
rpgwizard : put sdl.dll in the pcsx2 root folder. if it does not work put it in the "plugins" folder.
NHervé is offline   Reply With Quote
Old September 27th, 2007   #8 (permalink)
paulsy
and why shouldn't I
 
paulsy's Avatar
 
Join Date: Jul 2002
Location: wisconsin
Posts: 305
is this windows only?
__________________
windows xp
1.8 gig p4
20 gig hd
40 gig hd
256 mb of ram
tnt2 m64

"they can beat us but they can't eat us"
paulsy is offline   Reply With Quote
Old September 27th, 2007   #9 (permalink)
RPGW1ZaRD
PCSX2 & O/C Addict
 
RPGW1ZaRD's Avatar
 
Join Date: Mar 2006
Location: My Computer
Posts: 2,655
Quote:
Originally Posted by NHervé View Post
rpgwizard : put sdl.dll in the pcsx2 root folder. if it does not work put it in the "plugins" folder.
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.
Attached Images
File Type: jpg pad.jpg (25.6 KB, 141 views)
__________________

« 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; September 27th, 2007 at 10:30.
RPGW1ZaRD is offline   Reply With Quote
Old September 27th, 2007   #10 (permalink)
NHervé
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 310
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.

I changed the attachments of the first post.

Last edited by NHervé; September 27th, 2007 at 17:15.
NHervé is offline   Reply With Quote
Old September 27th, 2007   #11 (permalink)
Hard core Rikki
JUMPIN' UP THE NATIONS
 
Hard core Rikki's Avatar
 
Join Date: May 2004
Location: Perpetual Hawaii
Posts: 4,321
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
__________________
< My deviantART | GENERALEMU | Webcomics
VBA-M | @ES

May the fleas of 1000 camels infest the crotches of BIOS swappers!
And may their arms be too short to scratch!
Hard core Rikki is online now   Reply With Quote
Old September 27th, 2007   #12 (permalink)
NHervé
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 310
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 by NHervé; September 27th, 2007 at 18:28. Reason: Automerged Doublepost
NHervé is offline   Reply With Quote
Old September 27th, 2007   #13 (permalink)
refraction
PCSX2 Coder
 
refraction's Avatar
 
Join Date: Jan 2004
Location: Plymouth, UK
Posts: 9,215
Quote:
Originally Posted by RPGW1ZaRD View Post
A new plugin cool.

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.
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.
__________________

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 online now   Reply With Quote
Old September 28th, 2007   #14 (permalink)
NHervé
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 310
Talking 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 by NHervé; September 29th, 2007 at 08:13. Reason: visibility
NHervé is offline   Reply With Quote
Old September 29th, 2007   #15 (permalink)
mchomicz
Registered User
 
Join Date: Sep 2007
Location: USA
Posts: 10
Would this be the plug-in to use with a game pad?

Quote:
Originally Posted by NHervé View Post
Here is a new version of megapad with 2 little fixes.
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
mchomicz is offline   Reply With Quote
Old September 29th, 2007   #16 (permalink)
NHervé
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 310
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 by NHervé; September 29th, 2007 at 20:33. Reason: Automerged Doublepost
NHervé is offline   Reply With Quote
Old September 30th, 2007   #17 (permalink)
RPGW1ZaRD
PCSX2 & O/C Addict
 
RPGW1ZaRD's Avatar
 
Join Date: Mar 2006
Location: My Computer
Posts: 2,655
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.
__________________

« 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
RPGW1ZaRD is offline   Reply With Quote
Old September 30th, 2007   #18 (permalink)
NHervé
Plugin author
 
NHervé's Avatar
 
Join Date: Jul 2007
Location: Nulle part
Posts: 310
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.
__________________
Pcsx2 is great emulator and Megapad is great pad plugin !!!

Last edited by NHervé; September 30th, 2007 at 17:41. Reason: Automerged Doublepost
NHervé is offline   Reply With Quote
Old September 30th, 2007   #19 (permalink)
RPGW1ZaRD
PCSX2 & O/C Addict
 
RPGW1ZaRD's Avatar
 
Join Date: Mar 2006
Location: My Computer
Posts: 2,655
Quote:
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.
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.
__________________

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