The NEW Build Your Own Arcade Controls

Main => Software Forum => Linux => Topic started by: mewyn on August 08, 2008, 12:30:00 pm

Title: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: mewyn on August 08, 2008, 12:30:00 pm
After many hours of trying and not being able to get 2600's .Net program for setting Ultrastik 360s working I took it upon myself to write ultraset, a small program based on 2600's program to set the Ultrasticks, but mine was written in C.

It's a very simple program, it sets all sticks to the same mapping and only sets to the built-in mappings, for now at least.  It also only works with firmware 2.2 and above, because it sets the mode in memory, not flash.  I chose to do this to save the flash from degrading, as commonly you only have 10,000 erases on flash. 

Try it out, let me know if you have any problems, and if you're a coder (I'm not much of one myself) and feel inclined to do so, help me improve it! :)

http://tuxnami.org/ultraset/ultraset-0.1.tar.gz (http://tuxnami.org/ultraset/ultraset-0.1.tar.gz)
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: whammoed on September 10, 2008, 12:03:04 pm
Awsome.  I was just asking Andy about the u360 and linux.

Can you write up how to install and use?  It's been quite a while since I've messed with my linux machine and I'm really rusty.
edit: I think I can get it from the README file...

That's pretty impressive for not being much of a coder. :applaud:
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: whammoed on September 10, 2008, 01:44:16 pm
I see in the readme you were having trouble with the diaganol 4 way map.  I double checked it against the default map in the windows based utility that Andy provides and it appears to be the same.  Not sure what the issue may be?

Here is the windows um file data:

MapRow1=NW,NW,NW,NW,*,NE,NE,NE,NE
MapRow2=NW,NW,NW,NW,*,NE,NE,NE,NE
MapRow3=NW,NW,NW,NW,C,NE,NE,NE,NE
MapRow4=NW,NW,NW,C,C,C,NE,NE,NE
MapRow5=*,*,C,C,C,C,C,*,*
MapRow6=SW,SW,SW,C,C,C,SE,SE,SE
MapRow7=SW,SW,SW,SW,C,SE,SE,SE,SE
MapRow8=SW,SW,SW,SW,*,SE,SE,SE,SE
MapRow9=SW,SW,SW,SW,*,SE,SE,SE,SE

Here is the ultraset data formatted for a little easier viewing:

0x09,0x09,0x09,0x09,0x0A,0x03,0x03,0x03,0x03,
0x09,0x09,0x09,0x09,0x0A,0x03,0x03,0x03,0x03,
0x09,0x09,0x090x09,0x01,0x03,0x03,0x03,0x03,
0x09,0x09,0x09,0x01,0x01,0x01,0x03,0x03,0x03,
0x0A,0x0A,0x01,0x01,0x01,0x01,0x01,0x0A,0x0A,
0x07,0x07,0x07,0x01,0x01,0x01,0x05,0x050x05,
0x07,0x07,0x07,0x07,0x01,0x05,0x05,0x05,0x05,
0x07,0x07,0x07,0x07,0x0A,0x05,0x05,0x05,0x05,
0x07,0x07,0x07,0x07,0x0A,0x05,0x05,0x05,0x05
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: whammoed on September 10, 2008, 02:46:07 pm
Will this work with a circular restrictor installed?  Not sure how that works...
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: whammoed on September 10, 2008, 04:48:32 pm
Will this work with a circular restrictor installed?  Not sure how that works...

I looked at the source for the C# setControls project and:
Looks like the third byte in the first buffer needs to be 0x09 instead of 0x10 if you are using a restrictor.  Easy enough to change, or I guess you could make it an option when running
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: Space Fractal on September 10, 2008, 07:32:17 pm
Is its possible to change this program to use names instead of numbers? Its because of the upcoming MultiFE to Linux (which I still need to testing, so not sure when it release, so no date).

ETC there is no info on the ultimarc for how to updating the firmware, if a user have a older one installed? So I think you might want to sure it works with all firmware? Or is the limit the same in the C# version?

In MultiFE it send these possible strings to a prepost command line application before launch mame:

 pinball, tron, djoy4way, lightgun, trackball, stick, dial, joy2way, joy4way, joy8way.

where:
 tron is a joy8way joystick with a hard to reach diagonal (but not impossible).
 dial = act like a trackball (Mouse).
 pinball = analog (default).
 stick = analog (default).

If I can, I see I can alter the code to been accept these strings and include in the final Linux version of MultiFE when released (no date).
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: 2600 on September 11, 2008, 02:09:14 pm
Diagonal 4-way shouldn't be a problem.  What you may be encountering is more recent versions of MAME have mapped the inputs to diagonal already.  Therefore, you either need to remap the controls in MAME or when playing a diagonal game don't map it as a diagonal.

Glad to see some people know how to use the open source nature of my project properly.
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: mewyn on September 11, 2008, 10:42:38 pm
2600:  That could be, it seems fairly consistent with what I'm observing.  Getting Q*Bert working is lower on my priority list, as I'm still trying to perfect my cabinet :)

Space Fractal:  That's a possibility.  I wanted to add file handling and real names instead of numbers in the next version.  It was easier for me to parse only one byte on the command line than a string.  A quick-and-dirty fix for that is a wrapper script for the time being.

whammoed:  I'm not sure what the difference is with the restrictor.  I don't use them on my cabinet, 2600, any light on that subject?
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: whammoed on September 11, 2008, 10:49:17 pm

whammoed:  I'm not sure what the difference is with the restrictor.  I don't use them on my cabinet, 2600, any light on that subject?

I answered my own question in subsequent post...Your code has it set to no restrictor so you are good for your cab.

Quote
Looks like the third byte in the first buffer needs to be 0x09 instead of 0x10 if you are using a restrictor.
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: mewyn on September 12, 2008, 12:11:04 am

I answered my own question in subsequent post...Your code has it set to no restrictor so you are good for your cab.


It's more of what does that code do.  I thought the restrictors were just a piece of plastic to restrict the stick's motion.
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: Space Fractal on September 12, 2008, 06:51:52 am
.. which might been harder to reach, if you not a aware about it in the code. Its really a good point.
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: Blanka on September 12, 2008, 07:16:32 am
Can't it be put into all Mame's. I would like to be able to put say qbert.map in a folder with joystick configs and that is automatically loaded to the U360 when starting Qbert.
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: 2600 on September 12, 2008, 08:15:48 am

I answered my own question in subsequent post...Your code has it set to no restrictor so you are good for your cab.


It's more of what does that code do.  I thought the restrictors were just a piece of plastic to restrict the stick's motion.

Right, but you have to tell the firmware that the motion is restricted.  The firmware then will reconfigure the stick so that it will send the PC a full scale signal on the outer edges.  Otherwise you would only get like 3/4 of a signal.
Title: Re: ultraset - new program to set modes for Ultimarc's Ultrastik 360
Post by: mewyn on September 12, 2008, 07:19:31 pm
Well, I'll take a look at that for the next version.  I'll probably pick it up in a week or two.