Moderators: Mug UK, Zorro 2, Greenious, spiny, Sorgelig, Moderator Team
Locutus73 wrote:Mode 4 is intended for Dolphin emulator use, so we can find some code here https://github.com/dolphin-emu/dolphin
Locutus73 wrote:By the way, what would be the use of more than one wiimote? Two player lightgun games?
Sorgelig wrote:besides the IR pointer wiimote can be used as traditional gamepad. Together with nunchuck or classic controller it's pretty much normal gamepad. In Native mode you can use several wiimotes. Can it be use as 2 lightguns - it's up to the core.
Sorgelig wrote:btw, there is 3rd party adapters for wiimote to connect Gamecube gamepad, and even there is adaptor for DB9! So it's a good opportunity to make a wireless retro joystick
Locutus73 wrote:I suspect the Wiimote can be used for Nintendo Mini Classic Controllers too, so having good NES/SNES joypad replica with the added benefit of wireless and additional buttons (i.e. menu button) on the Wiimote.
kitrinx wrote:@sorgelig Nice job with SNES light gun. With your custom wiimote module, would it be hard to make a small calibration routine so it could be set up for true LoS targeting? Then it would be just like a real lightgun.
Sorgelig wrote:I didn't find the info about calibrating the Wiimote. If you point me to such info, then i will tell you how hard it to implement. On the Wii i even can define the position of bar top/bottom. In Linux driver there is no such option.
kitrinx wrote:To the best of my knowledge, there's no internal method for doing this. The way the wii does it, and I assume most other things that use the wiimote, is they apply an offset to the input based on user feedback. For example:
If you display a target on the screen, and tell the user to shoot that target (without providing crosshairs) then X/Y that is read when they pull the trigger can be associated with a real position on the screen. Doing this sequentially for 3 or 4 targets in the corners can let you easily calculate offsets to apply to raw input to make it line up with real positions on the screen. Since the TV doesn't really change the area that it draws in much, and we use scaled joystick input for the cores, you can make it very close to real LoS this way.
Sorgelig wrote:This is just to match the physical position of wiimote in hand with screen coordinates. It won't help to match SNES game target with wiimote target (as different SNES games treat SS coordinates differently). So if you are just looking to natch red cross with in-game cross, then simply use in-game calibration - it will do the job.
Actually for precise physical calibration it should be done on HPS side, where selected window will be cut from the whole range of wiimote coordinates leaving some outside gap for calibration, so core will get a clean calibrated coordinates. I think it must be done in either special calibration core, or in Menu core.
Still wiimote needs one important setting - bar top/bottom position, as even Wii requires this setting. It's something probably not implemented in current driver. Probably some code can be found in Dolphin emulator.
kitrinx wrote:For Aimtrak gun users, I have good news. I tested out an Aimtrak today and it works nicely with MiSTer. Setting up the controller is a little hard, so I attached the controller setup.
Sorgelig wrote:yes, i can do it
Code: Select all
Input event: type=EV_ABS, Axis=0, Offset=3370, jnum=2, ID:d209:1601:04, abs_min = 0, abs_max = 4095
Combined mouse event: btn=0x18, dx=-36, dy=0, scroll=0
PS2 MOUSE: 18 252 0
Input event: type=EV_ABS, Axis=0, Offset=3238, jnum=2, ID:d209:1601:04, abs_min = 0, abs_max = 4095
Combined mouse event: btn=0x18, dx=-33, dy=0, scroll=0
Input event: type=EV_ABS, Axis=0, Offset=3105, jnum=2, ID:d209:1601:04, abs_min = 0, abs_max = 4095
Combined mouse event: btn=0x38, dx=-33, dy=-44, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=235, jnum=2, ID:d209:1601:04, abs_min = 0, abs_max = 4095
PS2 MOUSE: 38 250 252
Input event: type=EV_ABS, Axis=0, Offset=2986, jnum=2, ID:d209:1601:04, abs_min = 0, abs_max = 4095
PS2 code(break)(ext) for core: 116(0x74)
Combined mouse event: btn=0x38, dx=-30, dy=-49, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=499, jnum=2, ID:d209:1601:04, abs_min = 0, abs_max = 4095
Input event: type=EV_ABS, Axis=0, Offset=2866, jnum=2, ID:d209:1601:04, abs_min = 0, abs_max = 4095
Combined mouse event: btn=0x38, dx=-30, dy=-49, scroll=0
Input event: type=EV_ABS, Axis=1, Offset=762, jnum=2, ID:d209:1601:04, abs_min = 0, abs_max = 4095
PS2 MOUSE: 38 250 247
kitrinx wrote:Is this what you need?
Sorgelig wrote:kitrinx wrote:Is this what you need?
yes.
Also log when input devices are opened, so i will see all devices of this gun.
Code: Select all
Close all devices.
Open up to 20 input devices.
open(/dev/input/event2): 13
open(/dev/input/event1): 14
open(/dev/input/event0): 15
has LEDs.
open(/dev/input/event17): 16
open(/dev/input/event16): 17
open(/dev/input/event8): 18
open(/dev/input/event6): 19
opened 0( 0): /dev/input/event2 (d209:1601) 0 "9" "Ultimarc Ultimarc"
opened 1( 0): /dev/input/event1 (d209:1601) 0 "9" "Ultimarc Ultimarc"
opened 2( 0): /dev/input/event0 (d209:1601) 0 "9" "Ultimarc Ultimarc"
opened 3( 3): /dev/input/event17 (16d0:0d04) 0 "1000" "BLISS-BOX 4-PLAY PORT.1"
opened 4( 3): /dev/input/event16 (16d0:0d04) 0 "1000" "BLISS-BOX 4-PLAY/GP PO1"
opened 5( 5): /dev/input/event8 (054c:05c4) 4 "00:00:00:00:00:00" "Sony Computer Entertainment Wireless Controller"
opened 6( 5): /dev/input/event6 (054c:05c4) 5 "00:00:00:00:00:00" "Sony Computer Entertainment Wireless Controller Touchpad"
Users browsing this forum: No registered users and 4 guests