HeadKaze's PlugInUltraStik 1.21 Released
#2
Posted 26 May 2008 - 07:16 PM
headkaze, on May 26 2008, 02:15 PM, said:
So I decided to write my own C++ UltraStik library and p/invoke it from C# instead of trying to find another libusb wrapper in C#.
So here is version 1.0 of my own UltraStik plugin, and I hope Oggalz isn't offended by me releasing it.
If you have any problems with it please post here. If your a Vista 32/64 user please let me know if it works on your machine.
Just gave this new version a thorough testing and it is changing some UltraStik mappings, unfortunately it's not changing them per the mameinfo.dat or PlugInUltraStik.ini.
I started with my UltraStiks in 8 Way Easy Diagonal modes programmed with Ultramap and confirmed they were working. I copied all of the files from the attachment above to the GameEx-->PlugIns folder. I also built a custom map with UltraMap, named it testcustommap.um (it has all directions inverted for easy testing), confirmed that it worked and moved it into the GameEx-->PlugIns-->UltraStikMaps folder.
I then turned on the Plugin and fired up GameEx. No matter the game, it appears to stay in joy4way mode. I tried changing all of the defaults in the PlugInUltraStik.ini file to joy8way and/or easyjoy8way and this had no effect. I also tried a custom entry (for the robotron since it's the easiest to tell if 8 way is working) robotron=joy8way which had no effect. I also tried my custom map on several roms (robotron=testcustommap.um) but that had no effect. The plugin does accurately change to 'mouse' mode upon exiting GameEx.
Seems like you're close, it's obviously changing the UltraStik maps, just not accurately.
#3
Posted 26 May 2008 - 11:41 PM
Turn on debug (it works now), although you won't see the popup message until you exit the game. I'll have to ask Tom if he can fix it so the message will appear before the game is launched.
A good way to test this is to run GameEx in windowed mode, and run UltraMap along side it. When you run a game you can tell if it's changed the settings from watching the little + cursor in UltraMap.
At least we know it's sorta working for you, but with 1.01 I really can't fault it. Can you also attach your testcustommap.um.
#4
Posted 27 May 2008 - 02:09 AM
Make sure you select a joystick from the list before you try setting a map. Again running UltraMap alongside this will help you figure out if the mapping is working okay.
Attached Files
#6
Posted 28 May 2008 - 06:36 AM
headkaze, on May 28 2008, 03:24 AM, said:
- Added support for using parent ROM names in PlugInUltraStik.ini
- Added support for UltraMap Config (.ugc) files
Hey Headkaze, thanks for the updates. I've given this the go-through, results below:
- The UltraStik test utility works perfectly. I was able to run it side by side with Ultramap and set every map type, including customs successfully. Not sure what the 'Set Flash' and 'Set Ram' do.
- Upon launching GameEx joys successfully changed to joy4way and successfully changed to mouse upon exit.
- Upon launching any Mame game, the joys stubbornly stayed in 4 way mode. Tried changing Mame's default to joy8way in the init file, didn't work. Tried custom rom entries, ie. robotron=joy4way and robotron=testcustom.um, didn't work.
- Initially in addition to staying in 4 way mode the joystick was drifting rather sharply. Found the following entries in the mame.ini file for digital joys:
joystick_map auto
joystick_deadzone 0.3
joystick_saturation 0.85
Removing them fixed this problem but the joy remains in 4 way mode. Tried leaving just joystick_map setting on auto and set to 0 and 1 but didn't seem to have an effect. - Turned on debug mode and tested 4 games, none of them show a joystick type, only rom names along with their clones in hash marks. Oddly, the 1943 dialog showed before the game launched but was blank. See below:
/xmvsfu/xmvsf (Xmen vs. Street Fighter)
/pacman/puckman (Pacman)
/robotron/ (robotron)
blank (1943) - Not sure how you implemented loading of .ugc files, so I didn't test that.
Custom map with directions inverted below. Seem to be getting closer.
#7
Posted 28 May 2008 - 02:36 PM
I think I know were the problem is but I still can't see any problem in the code. So attached is a test plugin that will show a MessageBox when it attempts to get the right map file.
You will need to run GameEx in Windowed mode to see the MessageBox's because I'm not using the internal one. You should see two messages called UltraStikMap1 and UltraStikMap2 when it attempts to set a map. The first one shows game details and the second shows the map file.
If there is an error it should show a MessageBox with the error. I'm expecting an error and hopefully this should give me enough info to figure out what's going on.
BTW ugc files allow you to have different mappings for different joysticks.
Eg.
# This is an Ultimarc UltraStik Game Configuration file UltraStikGameConfigurationFileFormatVersion=1.0 UltraStik1MapFile=Analog UltraStik2MapFile=Mouse Pointer UltraStik3MapFile=Analog UltraStik4MapFile=Analog
#8
Posted 28 May 2008 - 06:45 PM
#9
Posted 28 May 2008 - 07:18 PM
Okay I've uploaded a new version, this time when you turn on debug it will output to a log file called PlugInUltraStik.log. This should make life much easier. So shaunopp just run it with debug turned on then post your log here.
#10
Posted 29 May 2008 - 03:10 AM
headkaze, on May 28 2008, 07:18 PM, said:
Okay I've uploaded a new version, this time when you turn on debug it will output to a log file called PlugInUltraStik.log. This should make life much easier. So shaunopp just run it with debug turned on then post your log here.
Log file from test below. Ran a variety of games with different controls, Tron, Qbert, Space Invaders, Marvel vs. Street Fighter, Robotron, Galaga, Pacman etc...
#11
Posted 29 May 2008 - 07:30 AM
shaunopp, on May 29 2008, 11:10 AM, said:
Wrong log file, that's the GameEx log file, I need PlugInUltraStik.log located in the PLUGINS folder.
Also can you tell me what version of Mame your running?
#17
Posted 03 June 2008 - 12:36 AM
shaunopp, on May 30 2008, 03:14 AM, said:
Plugin Seems to work great, bounced back and forth between 4way and 8way games and everything seemed to play fine. Thanks for developing this, definately my most valuable plugin now. Running Vista64.
Not directly related to your plugin, but I have noticed that the UltraMap tool on my system does not show the actual map loaded, it seems to only display the last map loaded by the tool itself. I set my U360s to 2way, fired up GameEx and was able to navigate the menus fine in all directions. Alt tabbed over to UltraMap and it still showed 2way even after rescanning. Played 1943 in fine 8way fashion and chedk UltraMap again and it still showed 2way. So I would not rely too heavily on what it shows as being loaded.
#18
Posted 03 June 2008 - 12:54 AM
TimmyB, on Jun 3 2008, 08:36 AM, said:
Not directly related to your plugin, but I have noticed that the UltraMap tool on my system does not show the actual map loaded, it seems to only display the last map loaded by the tool itself. I set my U360s to 2way, fired up GameEx and was able to navigate the menus fine in all directions. Alt tabbed over to UltraMap and it still showed 2way even after rescanning. Played 1943 in fine 8way fashion and chedk UltraMap again and it still showed 2way. So I would not rely too heavily on what it shows as being loaded.
Glad you like it
As for UltraMap not showing the current map loaded to the stick, I don't think it can since programming the stick is mostly one way. AFAIK You can't query the device for what type of map it's using. Even if you could query it the maps can be totally custom so I can't image how it could do that anyway.
The way I use UltraMap is to watch the little + cursor as that shows the limitations of the joystick when you move it. In other words if the + cursor only moves up/down/left/right you know it's fourway, if it also moves diagonals it's 8-way, if it moves anywhere it's analog etc.
#19
Posted 03 June 2008 - 04:04 AM
The only game that didn't cooperate was Crazy Climber but it turns out that it has a weird mame configuration. For example, even though it's double 8-way joysticks you have to manually program Right and Left joystick directions manually specifically for Crazy Climber, you can't just rely on your default P1/P2 joystick configuration. Other double 8ways like Robotron don't seem to have this issue. The point I'm making here is that if it appears that the Plugin isn't setting the map correctly double check that is isn't a mame issue.
Great job Headkaze, this is invaluable for people who have U360's w/Vista and your time working on it is greatly appreciated. Make my gaming life much more
#20
Posted 03 June 2008 - 07:18 AM
Now all I have to do is find some time to finally install my U360's into my panel! I'm not looking forward to the job actually mainly because I will have to undo all the microswitch wiring for my current joysticks and I'm wondering if I'll even be able to unscrew the handles as I put a small amount of glue on the thread to stop them spinning around. I found out later on it's better to use tape instead so you can actually unscrew them if you need to; something I regret not doing now!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














