MiSTer-devel / Main_MiSTer

Main MiSTer binary and Wiki
GNU General Public License v3.0
3.03k stars 329 forks source link

MiSTer can read Wii Mote, but the cores can't #267

Open skooterblog opened 4 years ago

skooterblog commented 4 years ago

I bought a USB Wii Sensor Bar and a Wii Mote (Chinese clone). I'm aware that the motion plus version has some issues, and that the clones may have even more issues. But my problem seems odd:

I've tried different cores: NES, SMS, Genesis, SNES. I'm setting the lightgun to Joy1 as I think I'm supposed to do. But in none of them, I can move the crosshair. However, when I enter the calibration screen I realize it is working and MiSTer is reading its input just fine.

Am I doing something wrong?

This video shows my last attempts: https://youtu.be/cKqf5I_mwXs

sorgelig commented 4 years ago

next release will have fix for wiimote.

Left-Empty commented 4 years ago

I am experiencing this exact issue with all my controllers excepting keyboards after updating to 0705. OSD navigation is fine but interacting with the consoles or computers is impossible. Controls come back in game after a while (30 seconds?) but sometimes won't. When the controls come back, I sometimes lose access to the OSD menu, but this time for both controllers and keyboards. Reverting to 0703 build didn't fix it. I'm posting here just to get feedback in case my issue isn't tied to this one.

Edit: please ignore, after much testing I finally noticed it's the new behaviour with player assignments — only it was assigned to a weird button on all my pads (only A assigns a pad, and it is assigned to a middle button on all my six-buttoned controllers) . Sorry for interjecting here. Don't know why reverting to an earlier MiSTer didn't set it back the way it was before though!

felleg commented 3 years ago

Sorry for bringing back this issue, I think the same as @skooterblog is happening to me in a newer version.

Here is my setup:

I have followed the instructions in this video: https://www.youtube.com/watch?v=WBoZDGn0e3U Basically, in the NES core's input options:

Interesting note, in the Lightgun Calibration (pressing F10 in the MiSTer menu), the pointer doesn't seem detected at all. All values are stuck at 0000.

rsn8887 commented 2 years ago

The Wiimote pointer function works fine for me on MiSTer but only at first. I can calibrate it using F10 in OSD. It works perfectly in games but sadly only for a few minutes. After a few minutes of playing an actual game (I tried Superscope 6 SNES mostly), it seems the calibration wanders off more and more, and so has to be re-calibrated almost every 2 minutes. It seems the "wandering off" of calibration has to do with aiming towards the edges of the screen and then coming back to the center off the screen.

I am not sure if it matters but even after calibrating the Wiimote pointer with F10, the little red crosshair is nowhere near where I am pointing on the screen.

Maybe my problem is caused by using a Wiimote with Wiimotion plus inside? But I have no others.

Same Wiimote, same sensorbar setup, works fine with House of the Dead on my Wii, no re-calibration needed on the Wii.

sorgelig commented 2 years ago

MiSTer works with coordinates provided by WiiMote. If it drifts, then it drifts inside WiiMote - may be it has defect?

rsn8887 commented 2 years ago

It is not because of a defective Wiimote. Another user on Discord (240p) had the same problem yesterday.

You can check it easily with the red crosshair. If you point the Wiimote outside of the screen on the right, and then back, rapidly, the crosshair is now in a different position. Same happens on the left. This doesn't happen on Wii. It seems like maybe there's a bug in the coordinate reading or setup either in Mister main, or in the linux driver itself?!?! Maybe it is not enough to just read coordinates from WiiMote, but some other check is done as well on Wii, that is missing here?

EDIT: A funny thing happens if you first point outside the screen on the right, then on the left. After you point outside the screen on the right, then back to center, the red cross hair is shifted sideways. If you then point outside the screen on the left, then back to center, the red cross hair is almost centered again. This happened to 240p on Discord as well yesterday (https://discord.com/channels/647909397477195803/806024374368075776/900953414006099998)

rsn8887 commented 2 years ago

I wonder maybe sometime in the future, lightgun could be added to input test core, for easier testing?

sorgelig commented 2 years ago

MiSTer receives just absolute coordinates. Same way like touchpad sends absolute coordinates. Actual light tracking is done inside WiiMote. It's possible that issue in the driver, then may be you can check in internet if similar problem happens for other linuxes. May be RPi also uses WiiMote? May be something wrong with light bar setup on your MiSTer? May be there is some false light sources around screen, so WiiMote gets confused.

rautiocination commented 2 years ago

the problem is the code just uses one wii sensor LED and there are two on the wii sensor bar. when it loses tracking on one, it might reacquire the other LED and then all the tracking is offset by the distance between them. this is why the wiimote is designed to use at least two point minimum before tracking begins. the wiimote itself can track up to 4 for extra tracking performance, an example of such is xwiigun and i believe the GUN4IR also uses this as well.