Main > Project Announcements
Multi Lightgun Game Arcade : USB2Gun with Recoil
<< < (9/19) > >>
Howard_Casto:
Ok... I took a look at that document a little better. 

In theory at least, and this is just in theory, how you send the byte sting should be something like this:

Vendor and Product ID are self explanatory.  In the pdf VID =&h04b4 and PID = &h6571 but you guys have mentioned it isn't exactly the same product so you might want to double check on that. 

Now going by that pdf, to fire off outputs you use output type 1 in which it says the 0 byte is the mode (so &h01) byte 1 is the actual output value in bit masks and byte 2 is the mask to tell it which outputs to fool with.  The other bytes are omitted for a 8 byte total. 

So assuming the solenoids are hooked up to output 1 and 2 and the VID and PID are correct, in the function box in mame hooker would be filled out like so:

Device# = 1
Vendor ID = &H04b4
Product ID = &H6571
Report Length = 8
Bytes = &h01:&h03:&h03:&h00:&h00:&h00:&h00:&h00

The second byte(&h03 in this example) you would set to &h01 to turn on output #1, &h02 for output 2 and &h03 to turn them both on.  To turn them off, obviously set the byte to &h00.  The third byte is the mask.  Setting it to &h03 would have it control just the first two outputs, but for a script with would probably be best to mask each output individually. 

So Output 1 on would be:
&h01:&h01:&h01:&h00:&h00:&h00:&h00:&h00
and off would be
&h01:&h00:&h01:&h00:&h00:&h00:&h00:&h00

Likewise output 2 on would be:
&h01:&h02:&h02:&h00:&h00:&h00:&h00:&h00
and off would be
&h01:&h00:&h02:&h00:&h00:&h00:&h00:&h00

Again this is making a ton of assumptions like the documentation is actually correct... the hardware allows write access, ect....

I hope some of that is helpful. 

Oh one more thing.... when it talks about bits in the docs it means bitmasking.... again it's poorly documented in the pdf but one can assume that each multiple of 4 (aka a bit) is associated with that number output, so start with the number 0 and then for every output you want on, you add a value like so:

Output 1 = +1
Output 2 = +2
Output 3 = +4
Output 4 = +8
Output 5 = +16
Output 6 = +32
Output 7 = +64
Output 8 = +128

Obviously to have multiple outputs on at once, you add multiple numbers to zero.


mcseforsale:
Howard_Castro = Stud!

subscribed again.
Jollywest:
Thanks Howard. I tried Mamehooker briefly with it without joy and so I was looking for a software approach to the issue. After I'd exhausted all those options I was going to come to you with this if I still didn't have it working, I know your a busy man! :) thanks to Badmouth too for giving you the heads up.

I'm eager to get on this ASAP but first opportunity I get will either be late tonight or tomorrow.

One thing, when I tried Mamehooker before I had it linked to Mame and reporting outputs but the option for 'writing to custom.ini' was missing. Is this because Mamehooker couldn't see the device?
Howard_Casto:
Write to custom ini???
Jollywest:
Sorry... 'Edit ini for current rom'   :-[

Was a while back, lol!
Navigation
Message Index
Next page
Previous page

Go to full version