Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Troubleshooter 2: Shoot Harder  (Read 106357 times)

0 Members and 2 Guests are viewing this topic.

DarthMarino

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 565
  • Last login:Today at 06:55:24 am
Re: Troubleshooter 2: Shoot Harder
« Reply #120 on: March 09, 2013, 01:19:47 pm »
What's the dimensions of the side images?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #121 on: March 09, 2013, 01:31:04 pm »
Depends upon the resolution you are running.  As I've said, model 2 won't let you scale images, so artwork would have to be made for each resolution (I'm thinking 1080p 720p and 1600x900).

Math fun:

Take the height of your monitor resolution, divide by 3.

Multiply that value by 4... now you've got the 4:3 gameplay width.

Subtract this value from the real width, now you've got the total width of both strips. 

Now divide the value by two.... each strip is "this value" x height.

So for 1080p it would be 240 x 1080 for each side.  You'd start with images that big and scale down.  It's not a lot of width really... you might be able to put some text and that's about it. 

16:10 bezels would also work and you can find them via the same formula, but afaik there isn't a 16:10 resolution size standard so I wouldn't know what res to put them in. 

phasermaniac

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:January 24, 2024, 05:40:47 am
  • I want to build my own arcade controls!
Re: Troubleshooter 2: Shoot Harder
« Reply #122 on: March 10, 2013, 07:29:10 pm »
Mh, i have tried but by now dont have it working, i use wingun, wich works in direct input and maps triggerp2 to mouse 3 and reloadp2 to mouse 4
i have read the readme and this forum, downloaded t2 1.2, and created the cfg folder, no errors now.
I tried mapping p1 and p2 to the same id mouse, but doesnt seem to work... any suggestion?
Do you think it would  be possible adding reload to hodt3pc?
And any genesis sms sega cd support?
Qnyway thaks for the effort

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #123 on: March 10, 2013, 07:38:23 pm »
WinGun isn't a legitimate driver... it's another form of hack.  I read the guns at the hardware level, and since wingun is a software program, it won't work. 

I might be able to add support but I don't know what wingun shows up as, programmatically speaking.  So I need some info.  Honestly I thought that project was defunt.  Didn't they finally come up with guncon 2 drivers?

phasermaniac

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:January 24, 2024, 05:40:47 am
  • I want to build my own arcade controls!
Re: Troubleshooter 2: Shoot Harder
« Reply #124 on: March 11, 2013, 04:47:44 am »
well, yes i have read it is more like a hack, there also is guncon2pc driver from smog, or the topgun2 driver also works (only it dont have the flash crt lightgun needs).
but i love wingun because i can do flash 2player flash games very easy, as i only have to map each trigger to two different keys and wingun, using one only cursor makes the job, jumpin for a frame to the p2 aiming when shoot and returning to p1. This dont allow continous fire, but this doesnt worry me very much.

In fact, with the old trobleshooter i had to configure as "dual actlabs tv usb lightguns" and worked very nice.

it's true the new software is dessigned for the rawinput method, wingun seems outdated, but works the best i have tried with crt guns.

phasermaniac

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:January 24, 2024, 05:40:47 am
  • I want to build my own arcade controls!
Re: Troubleshooter 2: Shoot Harder
« Reply #125 on: March 11, 2013, 04:59:09 am »
this weekend i discovered this: "http://frenzy.gl.tter.org/"
its is a mod for quake 2 and another for half life for playing with dual lightguns.
the down side is it was dessigned for actlabs gs (the first actlabs). Only the Quake2mod works in version 1.2 with newer guns, and only with one gun. I have never been able to find the trigger p2, dont know which method did actlabs gs to play dual lightgun, but i thing this only worked in windows 98.
anyways surprised this was done more han ten years ago.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 05:42:45 pm
  • ...
RE: Troubleshooter 2: Shoot Harder
« Reply #126 on: March 11, 2013, 07:39:01 am »
Quote from: phasermaniac link=topic=130784.msg1#msg1
. I have never been able to find the trigger p2, dont know which method did actlabs gs to play dual lightgun,

Not sure about the GS model, but there is a  "P2" position on the 3 position switch on usb guns that make the trigger and button show as mouse buttons 3 and 4.  The instructions say this is for PC games that support act labs guns in 2 player mode.  I assume this works the same as what you're talking about.  The game gets the position from the single system mouse and credits the shot based on whether is sees mouse button 1 or 3 as the trigger pulled.  I don't know of any games that actually used it.  they usually just screwed you out of 2 player with guns.



Sent using Board Express

phasermaniac

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:January 24, 2024, 05:40:47 am
  • I want to build my own arcade controls!
Re: Troubleshooter 2: Shoot Harder
« Reply #127 on: March 11, 2013, 01:00:46 pm »
yes badmouth thats it, an with the usb actlabs, can you play quake2 gunfrenzy with both players? and the half life mod? have you tested that?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 05:42:45 pm
  • ...
Re: Troubleshooter 2: Shoot Harder
« Reply #128 on: March 11, 2013, 01:09:38 pm »
yes badmouth thats it, an with the usb actlabs, can you play quake2 gunfrenzy with both players? and the half life mod? have you tested that?
Not tested any of it.  No idea if it works with those games.
Wasn't aware of those mods until you posted.

phasermaniac

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:January 24, 2024, 05:40:47 am
  • I want to build my own arcade controls!
Re: Troubleshooter 2: Shoot Harder
« Reply #129 on: March 11, 2013, 07:21:44 pm »
So, howard, ther is no option equivalent to the “dual actlabs tv usb lightguns“, from the original troubleshooter?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #130 on: March 11, 2013, 07:30:46 pm »
I'm not sure to be honest.  Afaik the act-labs tv guns STILL show up as two different guns if you put them both in 1p mode.  In this respect it should still work.  Badmouth tried it with dual act labs and he said it worked fine.  I dunno if his are vga or svid though. 

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 05:42:45 pm
  • ...
Re: Troubleshooter 2: Shoot Harder
« Reply #131 on: March 11, 2013, 08:57:01 pm »
So, howard, ther is no option equivalent to the “dual actlabs tv usb lightguns“, from the original troubleshooter?

The TV USB Act Labs guns work fine with Troubleshooter2 and the supported games listed.
If you're trying to get it to do something with a game not listed as supported, it's not going to do anything for you.

I don't believe the original troubleshooter did anything for games other than those on the supported games list.

What guns do you have?
What game are you trying to play?


Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #132 on: March 11, 2013, 10:08:55 pm »
What he said.... the ts2, like the original ts, isn't a catch all solution.  As of now it works for the model 2 games and the few pc games that the first ts supported.  (Although there is a bug or two with pc launching that will be fixed next release.)

phasermaniac

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 318
  • Last login:January 24, 2024, 05:40:47 am
  • I want to build my own arcade controls!
Re: Troubleshooter 2: Shoot Harder
« Reply #133 on: March 12, 2013, 06:17:46 am »
yes, i know it doesnt work with any game (although support for any sms/gen/scd emu would be nice).
I'm trying with m2 emu. I suppose i would use the m2 games + hodt2pc, and hodt3pc, as the arcade versions are so smarter...
As i said before i use two guncon2(no namco) with Wingun, wich works in direct input, only one mice, and buttons mapping is: gun1trigger:mouse0, gun1reload:mouse1, gun2trigger:mouse2, gun2reload:mouse3.
this driver dont have any option to show up as two different guns (as actlabs seems to have),

Another cuestion, the fullscreen mode doesnt seem to work for me, has ts2 any action about this?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #134 on: March 15, 2013, 07:47:44 pm »
Just a minor update. 

I haven't forgotten about this it's just atm I'm slightly ill and regardless I don't have a lot of time to dedicate to programming.... right now I have some time to screw around on the forums and that's about it. ;) 

There should probably be a release of the new version next week though.  I did manage to find a little time today to implement some new features for the output system.  Daytona and a few others used hacked memory locations, so the data they output isn't always ideal.  So I added optional offsets and multiplier settings for each output.  This can transform the "cars ahead of you" variable that ramjet found into a true "car position" by adding 1 to the value, for example.  I mainly did it for outrun 2006 even though it's clear at this point that it will require a dedicated program.  I just figured if you wanted to add other pc games in the future, multipliers would be helpful. 

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:November 14, 2023, 12:54:43 pm
  • I want to build my own arcade controls!
AW: Troubleshooter 2: Shoot Harder
« Reply #135 on: March 17, 2013, 12:53:55 pm »
Can't get ts2 working with any of the hotd PC versions.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #136 on: March 21, 2013, 03:35:33 am »
It's a launcher code issue...  It's talked about in this very thread and will be addressed in the next release. 

Anyway progess report time.


I haven't worked on this in a few weeks because I was kind of burnt out on it and I haven't exactly been feeling well.  I've worked a little more on this this morning though.  This will probably be the last release for a while, so I'm trying to tidy things up a bit.  I've started making very simple docs for all of the problem games.  That's what the "Read Notes for This Game" button is for. 

I've also added another option I the model2 installer. 

Right now the lua scripts are all or nothing in that none are installed (which means that the lightgun games don't have crosshairs) or a lua script is installed for all 50+ games.  Now the reason behind this is that most of the games have outputs and ts2 needs to be launched to broadcast them, but if you aren't interested in that functionality you've got TS2 launching for games that don't need it. 

All of those fake recoil outputs I mentioned a few weeks ago are hooked up except for bel.  I'll get to it tomorrow hopefully. 

Then I've got to do some lua script cleanup.  Right now we've got a "buttons.lua" and a "readlines.lua" that are used in addition to the scripts for each name.  When I started writing the scripts they were aptly named, but they aren't anymore.  Buttons.lua will have to be renamed to "settings.lua", it's where all lua-based keycode constants are stored and now a few settings as well.    Readlines.lua gets renamed to "functions.lua" as this will hold all of your necessary functions. 

In addition, the generic lua script used for all non-gun games will get added functionality.  I think the "effect" script I made a while back was pretty successful, so I'll add that in as well as support to toggle on/off widescreen rendering. 

In addition, I want to do some experiments to see if lua scripts can be loaded from outside the "lua" folder and if they can be conditionally loaded.  Bezels, output controlled artwork, all of that jazz can be supported via the lua scripting system, but making it generic enough to work for every game can be tricky.  So my idea was to just leave it up to the author.  I could check if a lua file exists in the artwork folder named after the rom and if so "require" it.  Each artwork lua script will be expected to have functions named "load_art" and "render_art" and if the script is found, these will be called during the generic lua scripts loop.  What is actually done in this two functions would be up to the author.  It would make things very similar to mame's .lay files. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #137 on: April 05, 2013, 04:44:31 am »
Ok I finally got out of my Outrun 2k6-induced stupor  this weekend so I decided to go back to this and finish up those scripts. 

I did some testing....  I can load lua scripts from any directory and I CAN conditionally load them.  So armed with that knowledge, I should be able to do a full-on mame-style artwork system. 

What I'll do is store a "default.cfg.lua" in the artwork folder.  This will store all of your default aw settings.  (If widescreen is turned on, if you are using effect files, ect....)  If you change any of these settings in-game, just like mame, I'll create a specific .cfg.lua file for that game, saving the updated settings. 

The rendering and loading of artwork files for individual games will be handled via external lua scripts for each game... so it would be treated very much like a .lay file in mame. 

More generic artwork effects like a scanline overlay and widescreen mode, will be handled by a singular, generic lua script. 

This will take a little while to code and test, but it won't be terribly bad.  I should have the final (for now at least) release done very soon. 

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:November 14, 2023, 12:54:43 pm
  • I want to build my own arcade controls!
Re: Troubleshooter 2: Shoot Harder
« Reply #138 on: April 06, 2013, 01:27:10 pm »
Awesome, can't wait for the final version. Will this also fix some of the issues with VC1/2 ?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #139 on: April 06, 2013, 04:12:24 pm »
I'm not aware of any issues with the virtua cop games other than the upper-left corner issue with vc2.  That's something where I just need a new memory address and it would have to sit down for ages for find the proper values to NOP. 

It fixes issues with the pc game launching, issues with sky target, issues with inverted outputs and a few other minor things including a helper that'll let you know of the dx4vb dll is installed on your system. 

This new release is primarily to implement a artwork and screen effects system, which pretty much concludes any added functionality I can put into Model2 to make it a little nicer. 

Endprodukt

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 688
  • Last login:November 14, 2023, 12:54:43 pm
  • I want to build my own arcade controls!
AW: Troubleshooter 2: Shoot Harder
« Reply #140 on: April 08, 2013, 07:11:18 am »
I thought there was a problem with vc that you couldn't shoot the very left or right screen but I might be wrong.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #141 on: April 12, 2013, 06:45:01 pm »
Nope, not that I'm aware of. 

Anyway, worked on blocking out the widescreen script since it's the simplest and I'll use it as a template for the artwork script and overlay script. 


I'm having a hard time staying motivated because it's been really nice outside.  I'll see if I can write up the other two scripts this weekend so I can combine them all and get to testing. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #142 on: April 13, 2013, 05:33:14 pm »
Worked on the scripts a little more.  Completed one for effects (aka scanlines, ect).  What's left is a script to show graphics when paused and some example artwork files. 

I'm kind of stumped on that one actually.  Bezels don't exist for most of these games.  There are a few games that I can make active artwork files for... sky target has a danger lamp, and top skater has all these lights that flash... There aren't good pics for either.  Does anyone know of a good source?

ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:October 08, 2023, 11:47:26 pm
Re: Troubleshooter 2: Shoot Harder
« Reply #143 on: April 13, 2013, 05:56:44 pm »
Sorry I do not however just wanted to thank you for this.  I just tried ts2 on my cab for m2 and it works like a charm

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #144 on: April 13, 2013, 07:09:24 pm »
I appreciate the support as always. 

I went ahead and make a fake light bulb via Photoshop that I can use to simulate the marquee lamps on top skater.  Drawing anything made of glass is kind of tricky and although it still looks a bit amateurish, I'm rather proud of how it turned out.  I figured this would be the easiest example of active artwork because I can clone the same two images (light on and light off) multiple times similar to how mame often uses effects.  I'll make an art file tomorrow and post some pics. 

Sky Target is also doable, but the warning lamp is replicated in-game (the flashing red plane icon in your health meter) so I'm not sure if it makes sense to do one. 

I'll also do a generic one to simulate an arcade monitor. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #145 on: April 15, 2013, 09:00:49 pm »
I think I've got a decent example artwork file finished for top skater. 

Check it out:



The glowing bulb needs cleaned up a bit to keep the glow from getting cropped, but other than that. 

I found out that lua scripting doesn't support bitwise-operations (lame) so I'll have to write functions to do it.  But other than that, everything is moving right along.

ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:October 08, 2023, 11:47:26 pm
Re: Troubleshooter 2: Shoot Harder
« Reply #146 on: April 16, 2013, 06:26:37 pm »
Hi,  after playing with this for a day,  I've run into a problem that somethings two players work,  sometimes only one or none.  This happens even when only testing one game.  This also happens when I reboot.  Because I have removable panels with many USB controls,  it might be getting confused as to what to use.  Btw I only use ts2 with m2 and two aimtraks.

As a suggestion,  it would be great to be able to set TS2 to use controls defined by the windows identification string.   Controllerremaper for MAME does this and it works without a hiccup.

If you would like to diagnose my problem,  I would be happy to be a guinea pig.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #147 on: April 16, 2013, 10:31:53 pm »
It's an issue I thought somebody would eventually run into, but I don't have any good solutions atm. 

The only thing I have to work with in terms of unique identifiers is the physical address, due to the fact that I'm using the system messages method to read raw mice.  (Offers greater compatibility then the direct x method).  While I can certainly bind ids to these addresses, I'm fairly sure if your mice id numbers are jumping around, so are the addresses. 

I'll see if I can find something. 

ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:October 08, 2023, 11:47:26 pm
Re: Troubleshooter 2: Shoot Harder
« Reply #148 on: April 17, 2013, 06:34:50 am »
Thanks. That would be great.

Regarding directX your right, DrVentures app ControllerRemapper is using thedirectX dll to get the device ID. The deviceID I have observed is allways the same for my devices and mice regardless how many are connected to the system. After reinstalling windows, all my deviceIDs for my wheels, lightguns, mice, keyboards, and joysticks remained the same (checked with the provided tool - that was a shocker). The deviceID for my Aimtrak is similar to: HID#Vid_1241_Pid_1111#b_2eabd86_0_00000#

Mabye that might give you some ideas. Just let me know what I can do to help.

Cheers..
« Last Edit: April 17, 2013, 06:42:37 am by ArcadeBliss »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #149 on: April 18, 2013, 11:38:16 am »
Yeah I can't read vid/pids with the raw input api.  That's a hid thing.  There is an api that allows you to read the official device name of a raw input device, but I haven't gotten it to work yet.  It's supposed to pass me a pointer to a string containing the name, but the value comes up as "0" thus far.  It's probably a bad declaration on my end, but if it turns out that it isn't I have no way of getting a unique identifier as I discovered that the address IS dynamic. 

The problem with switching over to direct input is that some emulators/games have di on all the time, even if you aren't using it, and that could cause interference since we are hacking the interface.  Also it doesn't deal with true lightguns as well as the raw input api does.

ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:October 08, 2023, 11:47:26 pm
Re: Troubleshooter 2: Shoot Harder
« Reply #150 on: April 18, 2013, 01:48:37 pm »
Thanks for your efforts. Even though I know nothing about programming I started to search the interwebs for something useful. Let me know if I'm just being annoying.  Here are some links I found:


Hardware Link1
[lualibusb] - a libusb binding for general USB devices.
[luausb] - a libusb1 binding for general USB devices.
[luahidapi] - a hidapi binding for USB HID devices.

Bitwise operations Link2
« Last Edit: April 18, 2013, 01:53:00 pm by ArcadeBliss »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #151 on: April 18, 2013, 02:13:47 pm »
Heh... I appreciate the links, but that's lua scripting.  I use lua for any graphical mods to model 2 because of the fact that model 2 has a lua engine, it's just easier, but the actual troubleshooter app is just vb6. 

Also you linked me to usb/hid code.  I'm not using usb/hid, I'm using raw input devices.  I'll fix it probably, so don't worry about it. 

But no, you aren't being annoying.  I always appreciate any help I can get. 

ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:October 08, 2023, 11:47:26 pm
Re: Troubleshooter 2: Shoot Harder
« Reply #152 on: April 19, 2013, 01:53:28 am »
Vb6 eh? Let's see what I can find

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #153 on: April 19, 2013, 07:43:38 pm »
I found some example code to read the device name, which should be enough.  It appears to be in Portuguese, but I think I can make it out. 

What was throwing me off was the aforementioned pointer.  Apparently you first call the function and in the return length is great than 0 you call it a second time pointing to a byte array.  As usual the api was written with C in mind and vb flubs the conversion, so you have to do it manually. 

Also the "name" it sends is a big old string containing the vid/pid as well, which is nice because those are easily identifiable. 

I should be able to work with that.  What I'm going to do is still allow the "mouse id#/joy id#" setup but in addition I'll add a "hardcode id" option that uses these names.   

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #154 on: April 19, 2013, 08:36:17 pm »
Here if you want to play with something I modified the infamous rawtest app to list the available mice.  Just click the "list mice" button to your far right.

Note that the list you can generate has NO bearing on the rest of the app, but the "names" listed shouldn't change regardless of which usb device is plugged in first. 

I'll have to do the same thing for joysticks, but it's far easier in direct-input.


ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:October 08, 2023, 11:47:26 pm
Re: Troubleshooter 2: Shoot Harder
« Reply #155 on: April 20, 2013, 03:49:11 pm »
Downloading to test it now. Will let you know if it spits out the same vid/pid I am used to seeing

Btw found some code where the author was complaining the returned string was too long so he sent it through a hash algorithm to shorten it but still keep it unique.

So just feedback, I used the app and it displayed my two aimtraks ( I cut out the relevant part that I know)

HID#Vid_d209_Pid_1601_MI_02#8
HID#Vid_d209_Pid_1602_MI_02#8
« Last Edit: April 20, 2013, 05:06:49 pm by ArcadeBliss »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #156 on: April 20, 2013, 05:15:25 pm »
Could you post me the whole string please?

I've got a mess of devices here but not two of the same device.  Andy gives the AimTraks unique PID's, but most companies aren't so nice.  I was wondering how much of the string I could cut off, so I want to see what else differs in the two name strings. 

It's a shame that I don't have a easy way to get the plain text Instance name for raw devices.  In direct input I can skip the vid/pid stuff and just list "Madcatz Xbox 360 Controller"  ect...

ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:October 08, 2023, 11:47:26 pm
Re: Troubleshooter 2: Shoot Harder
« Reply #157 on: April 20, 2013, 05:44:14 pm »
no problem. Since the app does not allow me to copy the text, I've included a screenshot. The APP window does not allow me to expand it to show the rest of the text.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19400
  • Last login:Yesterday at 10:59:21 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: Troubleshooter 2: Shoot Harder
« Reply #158 on: April 20, 2013, 06:12:35 pm »
That's what I suspected, thanks. 

It's odd really, normal devices use the "MI" section of the string to give the instance number.  You'll notice that you have two other identical devices hooked up and their mouse instance values are different.  The aimtracks use the same mi number though, which is odd.  So I think I can use just the first portion of the string and it will be enough.  I don't really see any reason to add all the other junk as it just makes things hard to read. 

ArcadeBliss

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 167
  • Last login:October 08, 2023, 11:47:26 pm
Re: Troubleshooter 2: Shoot Harder
« Reply #159 on: April 20, 2013, 06:15:20 pm »
Just to let you know, the other two that look similar happen to be my opti-pac :) . let me know if I should hook up my usb keyboard and mouse combo for further info.
« Last Edit: April 20, 2013, 06:20:14 pm by ArcadeBliss »