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: GUNS: Mayflash DolphinBar Wii controller interface  (Read 17015 times)

0 Members and 1 Guest are viewing this topic.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
GUNS: Mayflash DolphinBar Wii controller interface
« on: August 24, 2016, 07:37:45 pm »
No time for putting it to actual use with an emulator, but it's a new toy so I have to open it and see how it works.


The bar is about 8.5" long.  It comes with a stand that's about 3/4" tall.  I'm not sure if it's necessary or not.


So far I'm Impressed. 
I plugged the bar in and drivers loaded instantly.



I don't own a Wii and am not used to syncing controllers.
It took me a few tries to get it synced, but that could have had something to do with my inexperience.
Once synced, it automatically resynced after turning the gun on and off as well as unplugging and replugging the DolphinBar.

Once synced, aiming the gun moves the mouse pointer.
I do not see a way to calibrate anything outside of the emulator.
The Walther P99 Wii controller I'm using was released before wii plus controllers came out.
I don't think it's quite as accurate as an AIM-Trak, but it's not too far off.
I can't really comment too much on this until I have a chance to calibrate it in an emulator.

I do not see any way to remap the keys it posts.
There are charts in the manual explaining which keys post for which wii remote button.



There are two switches on the back.  One for ON/OFF.  The other is for whether you're placing it above or below the monitor.



There are 4 modes.  These can be changed using the button on the device or by pressing HOME+DPad Direction. (HOME+Dpad down also switches to a sub-mode on mode 1, so not exactly sure how that works)
Changing modes breaks the USB connection and the PC redetects it, but the link with the gun is maintained.

Mode 1: Keyboard & Mouse Mode - Supports ONE wii controller.   Does not support nunchuck or classic controller.  Includes a second "multimedia status" sub-mode accessed by pressing HOME+DOWN
              This second sub-mode posts as keyboard multimedia keys.

Mode 2: Keyboard & Mouse Game Mode - Supports ONE wii controller+Nunchuck

Mode 3: Game Controller Mode - Supports up to 4 Wii controllers+Nunchuck or Classic controller
              4 controllers show up in windows devices regardless of how many controllers are paired.
              I originally was disapointed that aiming the gun didn't control an analog joystick.  After reading
               the instructions more carefully, I see that it will indeed behave that way if a nunchuck is connected.
              It may be possible that this is another sub-mode that could be accessed without the nunchuck, but
              the instructions don't read that way.
I believe this is important if we want support for 2 guns.
              See attached instructions.  EDIT: After messing with it some more, I see no way for the aiming to show
              up as an analog axis unless a nunchuck is connected.  So you're going to need nunchucks connected if
              using 2 guns.

Mode 4: Wii Emulator Mode: Supports up to 4 wiimotes.  Supports TR Wiimmotes and newst Dolphin 4.0-2241 after installing latest firmware.
              This is all the description it gives.

Overall this does seem to solve the issue of consistent pairing.  It seems I'll be able to leave the bar inside the cab and turn on the gun when I want to use it.
I'm not sure how it's going to work with 2 controllers.  A friend who moved away has my 2nd gun.  It will be a while before I can get it back.

This is the only Wii controller I have to test with....but I like it.  :laugh:

« Last Edit: August 24, 2016, 08:57:19 pm by BadMouth »

thomas_surles

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2115
  • Last login:June 19, 2023, 07:20:00 pm
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #1 on: August 24, 2016, 08:20:31 pm »
Do you have a link to that gun?

Also just read a review that worried me.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #2 on: August 24, 2016, 08:30:31 pm »
That wouldn't be that much of an issue... the leds don't do anything special so just stack another sensor bar on top. 

The game controller mode is the mode you would want to use 90% of the time as most emulators/pc games don't support dual mice but they do support dual joysticks.  It's unfortunate that the other modes are 1 player only though. 

Mode 4 is most likely a raw serial device as that's how Dolphin accesses the wiimotes.  You could use this mode for glovepie scripts as well I'm guessing, but personally I wanted to get away from that. 

Slippyblade

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3167
  • Last login:November 16, 2023, 11:39:51 am
  • And to the death god we say, "Not today!"
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #3 on: August 24, 2016, 08:34:37 pm »
Meh.  If the LEDs quit working it's a simple hack to replace them.  You can even see which LEDs are working by looking at the bar through a cell phone camera.  Those can see the IR.  :)

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #4 on: August 24, 2016, 08:53:11 pm »
I fiddled around with it some more.

In mode 3:gamepad mode, I cannot find a way to get it to post the camera as an analog axis with the basic wiimote I have.
The instructions say it does this if a nunchuck is connected.  I don't have a nunchuck to test with, but I'm going to say that this is a necessity if you want them to show up as joysticks.  I tried pressing the button combination for entering the mode I was already in since that's how you change to a sub-mode in mode 1, but it did not do anything while in Mode 3.

After multiple solutions for having two guns come out (Troubleshooter 2 & DemulShooter), I might be back to being stuck with one gun.  :lol  :'( 

Howard is probably correct about mode 4.  It still shows 4 gamepads, but there is nothing in windows controllers to look at.
It doesn't show any axis, buttons, etc.

It seemed more jittery this time around.  Probably from different lighting.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #5 on: August 24, 2016, 09:03:31 pm »
Do you have a link to that gun?

Nope, they aren't available anymore and weren't legal for sale in the U.S. due to the end of the barrel not being bright orange to differentiate it from a real gun.

They look higher quality then they actually are.
They look cool and are comfortable to hold, but are extremely light and the buttons feel chincy.

The features list vibration, but it doesn't feel heavy enough to contain a shaker motor.
There is a speaker in it.  When I get the other one back, I may tear it apart and see if I can add a standalone vibration circuit.
(if there is indeed a rumble motor in it)
« Last Edit: August 24, 2016, 09:07:44 pm by BadMouth »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #6 on: August 24, 2016, 10:37:36 pm »
I'll probably order a bar this weekend.  I might be able to integrate a pseudo driver for ts2 for the emulation mode.  Again though, I was trying to get away from that. 

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #7 on: August 25, 2016, 02:10:43 pm »
Any idea how it detects that a nunchuck is connected?  The guns have the connector on the bottom.
If it's a matter of installing a jumper wire or resistor to fool it, that would be an easier fix than software.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #8 on: August 25, 2016, 05:14:47 pm »
It's more complicated than that I'm afraid.  The wii/wii u protocol is a surprisingly sophisticated I2C serial bus system.  It's kind of like usb.... the wiimote acts as a hub and extension controllers report their status, allowing for hot swapping. 

The wiimote is well documented if you want to try to find another method:

http://wiibrew.org/wiki/Wiimote/Extension_Controllers

Your cheapest and easiest route is to just buy a nunchuck.  While the official ones are expensive, you can get bad Chinese knock-offs for a couple bucks. The pcbs are basically nothing but the analog stick, so you could probably cram one inside the gun.  Myself I had planned on converting the nunchuck to a pedal for the shooting games where you duck. 

MrThunderwing

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1054
  • Last login:Today at 03:06:18 pm
  • As I pass, do I give you the ass or the crotch?
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #9 on: August 27, 2016, 08:00:16 am »
Wow, that gun looks super-realistic, I'm surprised you can get something like that in the US without it having some big orange bit stuck on it to make it more obvious it's a toy Edit: Ah, I didn't read the whole thread. Make sure you're not waving it around in your living room BadMouth if you happen to have some trigger happy cops driving past your house. The sensor bar thing seems pretty cool, I wonder if you can get something like this that'll work for PC with a PS move, ' cause I've got of they with some gun housings.
« Last Edit: August 27, 2016, 08:04:15 am by MrThunderwing »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #10 on: August 27, 2016, 12:53:18 pm »
I know a ps3/ps4 dongle is out.... I'm not a Sony guy so I don't have any details though.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #11 on: August 27, 2016, 02:48:55 pm »
I went ahead and ordered one so maybe when I get it I can whip up something to resolve some of the issues.  Atm my eye is wearing me out though.... I get headaches just sitting around. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #12 on: August 27, 2016, 05:28:03 pm »
Hey, apparently mayflash is still doing firmware updates to this thing.  I wonder if they would add a sub-mode if we ask?

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #13 on: August 27, 2016, 10:34:31 pm »
To those without prime, a couple of vendors popped up on amazon tonight offering free shipping.  Take advantage while you can!

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #14 on: August 30, 2016, 11:57:29 pm »
I'm (im)patiently waiting for my bar.  I have a lot of quick mods planned that I'll document for you guys.  It should be fun assuming I can get it done before my eye surgery.  Apparently I could potentially be banned from doing anything fun for a while. 

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #15 on: August 31, 2016, 09:21:04 am »
I'm (im)patiently waiting for my bar.  I have a lot of quick mods planned that I'll document for you guys.  It should be fun assuming I can get it done before my eye surgery.  Apparently I could potentially be banned from doing anything fun for a while.

Can you code with the other eye?  ;D

Joking of course.  I had eye surgery at a very young age.  Too long ago to offer anything useful.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #16 on: August 31, 2016, 10:24:00 pm »
I'm already sitting at a 45 degree angle to avoid the dizziness.  With one eye forward as wide as possible and one further away squinting I look like the villain of a Scooby Doo cartoon. 

Mine came in today and I just tested it. 

The syncing works great and it's worth it for that alone, but I'm not super impressed with the built in modes.  Mouse/Keyboard works well enough, but as you said, 1 player.  Also I was hoping I could mount the bar on the bottom, but it kept jittering all over the place in bottom mode.  I plugged in a nunchuck, and the "game mode" still doesn't handle the wiimote correctly.  The wiimote itself is mapped to Z and RZ, meaning it won't work well with most pc games and I think it's actually mapping the tilt sensors instead of the ir.  I fired up mamehooker to see if I still had access to the outputs, and nope.  Unless it's in emulation mode, which I can indeed confirm is raw serial mode, I can control rumble or leds. 

So for me to get the hardware working the way I want it, I will have to write custom software for emulation mode or use some of the pre-existing ones (glovepie, ect). 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #17 on: August 31, 2016, 10:29:51 pm »
Oh, and I forgot to mention that if you change modes, mamehooker gets confused and the outputs no longer work.  I can probably add a new mode to refresh the hids and fix it, but it's worth noting. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #18 on: September 01, 2016, 12:49:28 am »
I'm trying to test my old scripts, but for the life of me I can't get ppjoy to install.  If anyone has it installed on windows 10 let me know. 

nexusmtz

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 489
  • Last login:June 01, 2022, 03:14:22 am
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #19 on: September 01, 2016, 03:16:38 am »
Installed ppjoysetup-0-8-4-6(5) on Windows 10 Anniversary (VM) after setting testsinging on and rebooting.
dxdiag shows PPJoy Virtual Joystick 1 with a status of attached.

I don't use the program, so I don't know if it's working properly, but it did install.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #20 on: September 01, 2016, 11:45:34 am »
Well my first problem is I can't find ppjoy.  I finally found a version, but it's unclear which version it is.  I installed it in test mode, but it didn't install properly warning I should install manually.  Then I right clicked on the inf files and installed that way and windows didn't complain, but it still won't work.... I can't even get the controller setup to load. 

I'm finding more fault with the dolphin bar I'm afraid.  In any of the mouse modes, when you press the trigger, movement pauses for a split second.  This is ok for lightgun games, but it'll ruin your game for positional gun games.  I did try the game mode and in mame mapping the z and rz makes it playable, BUT no force-feedback.  fedit.exe can't even find the controller. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #21 on: September 01, 2016, 11:48:06 pm »
Well glovepie is kind of a mess anyway.  I looked at other libraries and sadly they all came up short.  freepie is dead and they never implemented ir support and the .net wiimote library has some serious bugs. 

I guess I'm going to have to roll my own.  I already know how to communicate to the wiimotes.... I did that for led+rumble control in mamehooker.  I'm just going to have to hook up the read values as well. 

wiibrew's documentation of the wiimote protocol is fairly confusing for the ir portions so if anyone has done this before or can illuminate things for me I sure would appreciate it. 


When I'm done I'm just going to pump all the wiimote data into an app that will allow you to bind them to a button/axis in vJoy and be done with it. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #22 on: September 02, 2016, 05:37:51 pm »
Ok I managed to get button/accelerometer reading working but I'm noticing a significant amount of lag.  I must be doing something wrong.  I'll look into the .net code and see if I can figure it out.  IR data, as I mentioned, is more confusing.  baby steps. 

Anyway, my eye hurts so that's it for today.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #23 on: September 02, 2016, 08:21:21 pm »
Ok I managed to get button/accelerometer reading working but I'm noticing a significant amount of lag.  I must be doing something wrong.

Maybe not.  I tinkered around with it a bit more this evening.  It turned out that where my cab is currently located, there isn't enough room for the player to stand back far enough.  So much for adding guns to my cab.

So I decided maybe it would work on the console PC in the living room.
Since there isn't any calibration, I moved the IR bar left and right to compensate.
The mouse pointer was still a few inches low (on a 70" screen).

I fired up Duck Hunt on VituaNES.  I also experience enough lag to effect gameplay (at least in my opinion).
I had to use the crosshairs on the screen since there was no further calibration and it was still shooting low.
I did ok, but due to the lag had to aim where the duck was going and wait for the crosshairs to catch up before firing.

Not sure if it was the distance (15ft), but the gun disconnected for no reason and didn't seem to want to reconnect until I leaned forward.
The timing could have just been a coincidence.  I didn't do any testing to determine it.

EDIT: Not sure if relevant, but I didn't notice the lag when using it on my 14" laptop screen.  Wasn't playing games on it either though.
« Last Edit: September 02, 2016, 08:25:26 pm by BadMouth »

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #24 on: September 02, 2016, 09:17:12 pm »
I'm slowly but surely figuring it out. 

I tweaked the data that wiibrew said I needed to use until it worked right.  I think I've eliminated lag at this point just by doing that and tightening up my code loop.  I've got all the buttons and XYZ acceleration reading more or less correctly (the xyz values are bit-shifted for some reason so I need to fix that)  Tomorrow if I feel like it, I'll try to add in the complicated init sequence to get IR working and then I can try to hook it up to something.  I might need help with "the mathz".  The wiimote is actually capable of reading dot size as well, so with x,y and z of two points I'm thinking a virtual plane could be calculated and the aim pos determined that way. 

There's still more to do though.  Stuff plugged into the expansion port is really weird and a lot of hand-holding is needed to manage wiimotes when they cut-out or are added as a device, ect so that everything "just works"

thet0ast3r

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:October 26, 2020, 02:10:37 pm
  • Chihiro ftw
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #25 on: September 04, 2016, 08:26:27 am »
I think it`s not possible to get a plane simply with 2 points and their size, I recently looked at the points output of the wiimote, and the point size is pretty jaggy.
if you get near the edge, the points become smaller, because the camera just sees a part of it (I don`t think wiimote cameras are "focused" that well). I noticed this behavior on the outside 5-10 % of the wiimotes field of view. I`d love to try to write an algorithm with which the wiimote becomes more accurate and the need for calibration for every viewpoint is eliminated.
However, I had to work with glovepie & ppjoy until now, as I`m not that familiar with hooking up the native wiimote protocol. But glovepie scripting is pretty exhausting for me (it`s some sort of ?basic, but not that well documented, no support for arrays, functions etc..).
Additionally, ppJoy requires a driver signature enforcement overrider.
thet0ast3r

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #26 on: September 04, 2016, 12:47:21 pm »
Remember you also have the x,y,z of the wiimote, so an angle is also present.  In addition the distance between dots is a fixed point so a increase or decrease in the default value would mean a distance change and we can assume the dot that looks smaller is the one further away.  It would take some hardcore trig I'm guessing. 

There's lots of info about the wiimote protocol here 

http://wiibrew.org/wiki/Wiimote

Some of it is written in a confusing manner or is outdated, so that along with my eye is what's taking so long. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #27 on: September 05, 2016, 12:59:50 am »
Ugh... I coded too long... the world is a blurry mess. 

I thought I was going to have to make a wrapper for vjoyinterface.dll but I searched GitHub and SailorSat had already written one.  Nice!


So all that's left is to finish implementing all the wiimote junk and hook everything up. 

thet0ast3r

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:October 26, 2020, 02:10:37 pm
  • Chihiro ftw
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #28 on: September 05, 2016, 06:09:19 am »
Don`t strain your eye too much  ;)
I think the aim wouldn`t be too precise if we used the brightness values.
It should be possible if we use 4 ir points, it should be way more accurate than using 2, as (I think it should work ;D) with 4 we could track the exact location of the wiimote, hence eliminating the player`s position almost completely out of the equation.

EDIT: I don`t think its a good idea to use the size of the points, because its technically not the size, but the strength, and this is dependent on the angle and the type of led so I guess using it the system would be more prone to errors.
« Last Edit: September 05, 2016, 06:13:09 am by thet0ast3r »
thet0ast3r

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #29 on: September 05, 2016, 01:32:14 pm »
4 points is good in theory but I don't know how well it would work in practice.  I have to stand 3ft+ away from my cab in order to display both dots on the screen reliably and still be able to move to all 4 corners of the screen.  I can only imagine how much further back one would have to stand to keep 4 on screen at all times.  I intend to add a 4 point mode anyway, I just don't know if anyone will find a practical use for it. 
« Last Edit: September 05, 2016, 03:36:29 pm by Howard_Casto »

thet0ast3r

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:October 26, 2020, 02:10:37 pm
  • Chihiro ftw
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #30 on: September 05, 2016, 05:47:36 pm »
Yea, however, noone had the opportunity to try it with 4 points. Except the EMS topGun, and I believe my topgun has some sort of wide angle lens in front of the camera.
4 points and a wide angle lens should work fine for the wiimote. But we`ll see :) I`m gonna try it, for sure.
thet0ast3r

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #31 on: September 06, 2016, 12:51:53 am »
Nah man you are late to the party.  There were several 4 point glovepie scripts.... it just never caught on, probably due to the reasons I mentioned.

thet0ast3r

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 77
  • Last login:October 26, 2020, 02:10:37 pm
  • Chihiro ftw
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #32 on: September 06, 2016, 04:39:05 am »
Really? i never found a 4-point script that was decent :-[ , But I just began looking for it recently.
thet0ast3r

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #33 on: September 07, 2016, 01:19:22 am »
Well they aren't decent because of the problems I've mentioned.  Or at least I'm guessing that... I'm not great at the math involved to determine the center point when adjusted for rotation, but I looked at a few and it appeared correct to me.  I think it would be quite accurate IF you stood really far away.

Man I finally got extension controllers working.  Wiibrew had a typo for the dencryption command and every library I looked at duplicated the mistake save one.  It took me two evenings to track it down.  I hope I get this done before my surgery.  I think what I might do is allow the IR value to be modified via a simple script file that can perform math on the x,y and z of all four points.  That way it won't be immediately outdated like the current libraries that internalize their own method.  (Which isn't always great). 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #34 on: September 09, 2016, 01:29:06 am »
I'm super stressed so I worked on this.  Programming calms my nerves sometimes. 

I've got leds, rumble and the reading of all the values of a wiimote and nunchuck hooked up.  I've still got to hook up status reporting and error reporting, and I eventually want to map the rumble to standard force feedback, but it's mostly done. 

I don't think it'll be fully featured yet, but I should have something for you guys to test by Sunday/Monday. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #35 on: September 10, 2016, 01:55:05 am »
I worked on this a tad more since I can't sleep.  While running the app now auto-detects what you plug in.  I also hooked up initial IR reading.  Assuming I can come up with a good formula, everything seems to be reading ok.  Because I'm not smoothing the motion, it's much more responsive than the built in mayflash modes. 

Something that's useful to us in particular is the fact that when the wiimote loses it's IR sources, it sends all F's to let you know.  So offscreen reload should be easy to implement. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #36 on: September 11, 2016, 01:35:05 am »
So I've ran into one problem that I think is being caused by the mayflash bar.  All four wiimotes are listed as present, even if they aren't.  It appears that if I try to read a dead one, the function hangs indefinitely.  Writing causes an error though, so I guess I'll have to write something harmless every iteration of the loop.  Asking for a battery check report should be harmless enough, I just don't know how it will effect performance. 

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #37 on: September 12, 2016, 12:47:10 pm »
Ok before I start finishing things up I have a question.....  are there any 16:9 games to worry about?   I can't think of any personally. 

Here is the reasoning behind the question.  I think just to make things more simple, a 16:9 and 4:3 calibration mode needs to be added.  They could be swapped out via the home button or something.  But then I started thinking that the pc hasn't had a light gun release in years.  It's also worth mentioning that if you limit the movement to 4:3, you can typically stand much closer to the sensor bar. 

Keep in mind that for wii/wii u emulators the emulator will take care of things, so that's not my problem.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:March 25, 2024, 08:10:48 pm
  • ...
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #38 on: September 12, 2016, 05:48:31 pm »
I'm not sure of the aspect ratio of the hacked Silent Hill arcade game.  That's the only "emulated" game I can think of.

For PC, the new HOTD that's included with TOTD is the only one I can think of.

Howard_Casto

  • Idiot Police
  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19399
  • Last login:March 16, 2024, 05:59:16 pm
  • Your Post's Soul is MINE!!! .......Again??
    • The Dragon King
Re: GUNS: Mayflash DolphinBar Wii controller interface
« Reply #39 on: September 12, 2016, 05:57:21 pm »
They got that running?  Man I'm out of the loop these days. 

Perhaps multiple layouts could be cycled via the home and -/+ buttons.... since the mayflash uses home and the d pad. 

It was actually tolerable outside, so I worked on my car today.  I'll work on finishing this tonight or later in the week.